Skip to content

Commit

Permalink
Use assert_respond_to because it has better error messaging
Browse files Browse the repository at this point in the history
[#4628 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information
Neeraj Singh authored and josevalim committed May 18, 2010
1 parent 26e645f commit 73f0e1a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions actionpack/test/abstract/translation_test.rb
Expand Up @@ -9,18 +9,18 @@ def setup
end

def test_action_controller_base_responds_to_translate
assert @controller.respond_to?(:translate)
assert_respond_to @controller, :translate
end

def test_action_controller_base_responds_to_t
assert @controller.respond_to?(:t)
assert_respond_to @controller, :t
end

def test_action_controller_base_responds_to_localize
assert @controller.respond_to?(:localize)
assert_respond_to @controller, :localize
end

def test_action_controller_base_responds_to_l
assert @controller.respond_to?(:l)
assert_respond_to @controller, :l
end
end
4 changes: 2 additions & 2 deletions actionpack/test/controller/integration_test.rb
Expand Up @@ -176,8 +176,8 @@ def test_opens_new_session
session1 = @test.open_session { |sess| }
session2 = @test.open_session # implicit session

assert session1.respond_to?(:assert_template), "open_session makes assert_template available"
assert session2.respond_to?(:assert_template), "open_session makes assert_template available"
assert_respond_to session1, :assert_template, "open_session makes assert_template available"
assert_respond_to session2, :assert_template, "open_session makes assert_template available"
assert !session1.equal?(session2)
end

Expand Down
4 changes: 2 additions & 2 deletions actionpack/test/controller/send_file_test.rb
Expand Up @@ -55,8 +55,8 @@ def test_file_stream
response = nil
assert_nothing_raised { response = process('file') }
assert_not_nil response
assert response.body_parts.respond_to?(:each)
assert response.body_parts.respond_to?(:to_path)
assert_respond_to response.body_parts, :each
assert_respond_to response.body_parts, :to_path

require 'stringio'
output = StringIO.new
Expand Down

0 comments on commit 73f0e1a

Please sign in to comment.