diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-29 17:50:39 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-29 17:50:39 -0700 |
commit | 2be383b94619595a2b4886e35f599757eab6c878 (patch) | |
tree | af78bff9246b0954c0d4b29836482d6656fef029 /activerecord | |
parent | 0471fc9f1cf95865a9810b46f1227783fee40ab5 (diff) | |
download | rails-2be383b94619595a2b4886e35f599757eab6c878.tar.gz rails-2be383b94619595a2b4886e35f599757eab6c878.tar.bz2 rails-2be383b94619595a2b4886e35f599757eab6c878.zip |
test against AR class rather than the relation (thanks Andrew White!)
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/finder_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index 014588b6d9..3c242667eb 100644 --- a/activerecord/test/cases/finder_test.rb +++ b/activerecord/test/cases/finder_test.rb @@ -209,9 +209,9 @@ class FinderTest < ActiveRecord::TestCase end def test_model_class_responds_to_first_bang - assert_equal topics(:first), Topic.order(:id).first! + assert Topic.first! + Topic.delete_all assert_raises ActiveRecord::RecordNotFound do - Topic.delete_all Topic.first! end end |