diff options
Diffstat (limited to 'activerecord/test/cases/finder_test.rb')
-rw-r--r-- | activerecord/test/cases/finder_test.rb | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index daf8299242..4b819a82e8 100644 --- a/activerecord/test/cases/finder_test.rb +++ b/activerecord/test/cases/finder_test.rb @@ -17,7 +17,6 @@ require 'models/matey' require 'models/dog' require 'models/car' require 'models/tyre' -require 'models/electron' class FinderTest < ActiveRecord::TestCase fixtures :companies, :topics, :entrants, :developers, :developers_projects, :posts, :comments, :accounts, :authors, :customers, :categories, :categorizations, :cars @@ -800,18 +799,6 @@ class FinderTest < ActiveRecord::TestCase assert_nil Topic.find_by_title("The First Topic!") end - def test_find_by_does_not_overwrite_method_on_class - Electron.create(name: 'First Electron') - - assert_equal 0, Electron.times_called_find_by_name - - Electron.find_by_name('First Electron') - assert_equal 1, Electron.times_called_find_by_name - - Electron.find_by_name('Some Other Electron') - assert_equal 2, Electron.times_called_find_by_name - end - def test_find_by_one_attribute_bang assert_equal topics(:first), Topic.find_by_title!("The First Topic") assert_raises_with_message(ActiveRecord::RecordNotFound, "Couldn't find Topic") do |