From 8fbf9379039bca5fa226222ab4b69a12b37b7b0f Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Tue, 18 May 2010 12:06:37 -0400 Subject: [PATCH] Use assert_kind_of whenever possible instead of assert [#4643 state:resolved] --- actionmailer/test/test_helper_test.rb | 4 ++-- .../test/controller/new_base/bare_metal_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/actionmailer/test/test_helper_test.rb b/actionmailer/test/test_helper_test.rb index 440fb86..8ff604c 100644 --- a/actionmailer/test/test_helper_test.rb +++ b/actionmailer/test/test_helper_test.rb @@ -18,7 +18,7 @@ class TestHelperMailerTest < ActionMailer::TestCase end def test_setup_creates_the_expected_mailer - assert @expected.is_a?(Mail::Message) + assert_kind_of Mail::Message, @expected assert_equal "1.0", @expected.mime_version assert_equal "text/plain", @expected.mime_type end @@ -121,7 +121,7 @@ class AnotherTestHelperMailerTest < ActionMailer::TestCase end def test_setup_shouldnt_conflict_with_mailer_setup - assert @expected.is_a?(Mail::Message) + assert_kind_of Mail::Message, @expected assert_equal 'a value', @test_var end end diff --git a/actionpack/test/controller/new_base/bare_metal_test.rb b/actionpack/test/controller/new_base/bare_metal_test.rb index df4b39a..8a06e8d 100644 --- a/actionpack/test/controller/new_base/bare_metal_test.rb +++ b/actionpack/test/controller/new_base/bare_metal_test.rb @@ -18,10 +18,10 @@ module BareMetalTest string << part end - assert headers.is_a?(Hash), "Headers must be a Hash" + assert_kind_of Hash, headers, "Headers must be a Hash" assert headers["Content-Type"], "Content-Type must exist" assert_equal "Hello world", string end end -end \ No newline at end of file +end -- 1.6.5.2