Skip to content

Commit caf1bfc

Browse files
committed
use Ruby for mocking
1 parent 46139d3 commit caf1bfc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

actionpack/test/controller/url_for_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def test_subdomain_may_be_changed
9595
end
9696

9797
def test_subdomain_may_be_object
98-
model = mock(:to_param => 'api')
98+
model = Class.new { def self.to_param; 'api'; end }
9999
add_host!
100100
assert_equal('http://api.basecamphq.com/c/a/i',
101101
W.new.url_for(:subdomain => model, :controller => 'c', :action => 'a', :id => 'i')

0 commit comments

Comments
 (0)