diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2010-05-18 21:47:24 -0400 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-05-19 10:18:36 +0200 |
commit | b4629528866446aa59f663a1162edbdacee85600 (patch) | |
tree | d68a0f440d552285adf99b462b8bde39d346aaa6 /activerecord/test/cases/autosave_association_test.rb | |
parent | b753b4a076d7067efccbd1ad384829f77e62a064 (diff) | |
download | rails-b4629528866446aa59f663a1162edbdacee85600.tar.gz rails-b4629528866446aa59f663a1162edbdacee85600.tar.bz2 rails-b4629528866446aa59f663a1162edbdacee85600.zip |
Use better assertion methods for testing
[#4645 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/test/cases/autosave_association_test.rb')
-rw-r--r-- | activerecord/test/cases/autosave_association_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index 5cc5dff633..063f0f0fb2 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -1236,11 +1236,11 @@ class TestAutosaveAssociationValidationMethodsGeneration < ActiveRecord::TestCas end test "should generate validation methods for has_many associations" do - assert @pirate.respond_to?(:validate_associated_records_for_birds) + assert_respond_to @pirate, :validate_associated_records_for_birds end test "should generate validation methods for has_one associations with :validate => true" do - assert @pirate.respond_to?(:validate_associated_records_for_ship) + assert_respond_to @pirate, :validate_associated_records_for_ship end test "should not generate validation methods for has_one associations without :validate => true" do @@ -1248,7 +1248,7 @@ class TestAutosaveAssociationValidationMethodsGeneration < ActiveRecord::TestCas end test "should generate validation methods for belongs_to associations with :validate => true" do - assert @pirate.respond_to?(:validate_associated_records_for_parrot) + assert_respond_to @pirate, :validate_associated_records_for_parrot end test "should not generate validation methods for belongs_to associations without :validate => true" do @@ -1256,7 +1256,7 @@ class TestAutosaveAssociationValidationMethodsGeneration < ActiveRecord::TestCas end test "should generate validation methods for HABTM associations with :validate => true" do - assert @pirate.respond_to?(:validate_associated_records_for_parrots) + assert_respond_to @pirate, :validate_associated_records_for_parrots end test "should not generate validation methods for HABTM associations without :validate => true" do |