mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
use Ruby for mocking
This commit is contained in:
parent
46139d33c0
commit
caf1bfccc6
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ module AbstractController
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_subdomain_may_be_object
|
def test_subdomain_may_be_object
|
||||||
model = mock(:to_param => 'api')
|
model = Class.new { def self.to_param; 'api'; end }
|
||||||
add_host!
|
add_host!
|
||||||
assert_equal('http://api.basecamphq.com/c/a/i',
|
assert_equal('http://api.basecamphq.com/c/a/i',
|
||||||
W.new.url_for(:subdomain => model, :controller => 'c', :action => 'a', :id => 'i')
|
W.new.url_for(:subdomain => model, :controller => 'c', :action => 'a', :id => 'i')
|
||||||
|
|
Loading…
Reference in a new issue