diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2010-05-19 15:14:51 -0400 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-05-19 21:31:51 +0200 |
commit | 39a246f545a714b21c669e2f6eda4012526c3874 (patch) | |
tree | 89da32733821f0a7dcc56efdac82c72897eca424 /activerecord/test/cases/relations_test.rb | |
parent | bdb2871df7fb0a1eeceadb31aaba4d160df508aa (diff) | |
download | rails-39a246f545a714b21c669e2f6eda4012526c3874.tar.gz rails-39a246f545a714b21c669e2f6eda4012526c3874.tar.bz2 rails-39a246f545a714b21c669e2f6eda4012526c3874.zip |
Final iteration of use better testing methods
[#4652 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/test/cases/relations_test.rb')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index 7b9e680c02..b6815af67e 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -145,7 +145,7 @@ class RelationTest < ActiveRecord::TestCase relation = Topic.scoped ["map", "uniq", "sort", "insert", "delete", "update"].each do |method| - assert relation.respond_to?(method), "Topic.scoped should respond to #{method.inspect}" + assert_respond_to relation, method, "Topic.scoped should respond to #{method.inspect}" end end @@ -160,7 +160,7 @@ class RelationTest < ActiveRecord::TestCase relation = Topic.scoped ["find_by_title", "find_by_title_and_author_name", "find_or_create_by_title", "find_or_initialize_by_title_and_author_name"].each do |method| - assert relation.respond_to?(method), "Topic.scoped should respond to #{method.inspect}" + assert_respond_to relation, method, "Topic.scoped should respond to #{method.inspect}" end end @@ -238,7 +238,7 @@ class RelationTest < ActiveRecord::TestCase def test_default_scope_with_conditions_string assert_equal Developer.find_all_by_name('David').map(&:id).sort, DeveloperCalledDavid.scoped.map(&:id).sort - assert_equal nil, DeveloperCalledDavid.create!.name + assert_nil DeveloperCalledDavid.create!.name end def test_default_scope_with_conditions_hash |