mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Use assert_respond_to because it has better error messaging
[#4628 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
parent
26e645fa00
commit
73f0e1a842
3 changed files with 8 additions and 8 deletions
|
@ -9,18 +9,18 @@ class TranslationControllerTest < Test::Unit::TestCase
|
|||
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
|
|
@ -176,8 +176,8 @@ class IntegrationTestTest < Test::Unit::TestCase
|
|||
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
|
||||
|
||||
|
|
|
@ -55,8 +55,8 @@ class SendFileTest < ActionController::TestCase
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue