diff options
author | Ben Moss <ben@mossity.com> | 2013-03-09 14:54:19 -0500 |
---|---|---|
committer | Ben Moss <ben@mossity.com> | 2013-03-09 15:16:15 -0500 |
commit | 992d87db02507363a4ad4ab40a3e4c4b32cf0408 (patch) | |
tree | 9802314e8600e0bd5640538e00fd581c6cdf7e79 /activerecord/test/cases/fixtures_test.rb | |
parent | ca35454b498657cd94cb0a4203801e52687aa9e0 (diff) | |
download | rails-992d87db02507363a4ad4ab40a3e4c4b32cf0408.tar.gz rails-992d87db02507363a4ad4ab40a3e4c4b32cf0408.tar.bz2 rails-992d87db02507363a4ad4ab40a3e4c4b32cf0408.zip |
Deprecate #connection in favour of accessing it via the class
This allows end-users to have a `connection` method on their models
without clashing with ActiveRecord internals.
Diffstat (limited to 'activerecord/test/cases/fixtures_test.rb')
-rw-r--r-- | activerecord/test/cases/fixtures_test.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb index b0b29f5f42..8ad40ec3f4 100644 --- a/activerecord/test/cases/fixtures_test.rb +++ b/activerecord/test/cases/fixtures_test.rb @@ -477,9 +477,8 @@ class CustomConnectionFixturesTest < ActiveRecord::TestCase fixtures :courses self.use_transactional_fixtures = false - def test_connection - assert_kind_of Course, courses(:ruby) - assert_equal Course.connection, courses(:ruby).connection + def test_connection_instance_method_deprecation + assert_deprecated { courses(:ruby).connection } end def test_leaky_destroy |