aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/fixtures_test.rb
diff options
context:
space:
mode:
authorRonak Jangir <ronakjangir47@gmail.com>2015-09-10 00:30:40 +0530
committerRonak Jangir <ronakjangir47@gmail.com>2015-09-16 21:57:10 +0530
commit6f4521a9390f61593970559d2e47ce8a279dcdcc (patch)
tree6ed6adfcc0478c739482474d753a7811c8787fd4 /activerecord/test/cases/fixtures_test.rb
parentb455cadbfd0a272879c8703ba37375eb724aa493 (diff)
downloadrails-6f4521a9390f61593970559d2e47ce8a279dcdcc.tar.gz
rails-6f4521a9390f61593970559d2e47ce8a279dcdcc.tar.bz2
rails-6f4521a9390f61593970559d2e47ce8a279dcdcc.zip
Removed mocha from Active Record Part 2
Diffstat (limited to 'activerecord/test/cases/fixtures_test.rb')
-rw-r--r--activerecord/test/cases/fixtures_test.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb
index 64759160dc..e3c4bd9f4a 100644
--- a/activerecord/test/cases/fixtures_test.rb
+++ b/activerecord/test/cases/fixtures_test.rb
@@ -408,9 +408,11 @@ class FixturesWithoutInstantiationTest < ActiveRecord::TestCase
end
def test_reloading_fixtures_through_accessor_methods
+ topic = Struct.new(:title)
assert_equal "The First Topic", topics(:first).title
- @loaded_fixtures['topics']['first'].expects(:find).returns(stub(:title => "Fresh Topic!"))
- assert_equal "Fresh Topic!", topics(:first, true).title
+ assert_called(@loaded_fixtures['topics']['first'], :find, returns: topic.new("Fresh Topic!")) do
+ assert_equal "Fresh Topic!", topics(:first, true).title
+ end
end
end