diff options
Diffstat (limited to 'activerecord/test')
-rwxr-xr-x | activerecord/test/abstract_unit.rb | 1 | ||||
-rwxr-xr-x | activerecord/test/fixtures_test.rb | 12 |
2 files changed, 12 insertions, 1 deletions
diff --git a/activerecord/test/abstract_unit.rb b/activerecord/test/abstract_unit.rb index 9d8adf2509..a09c8daad5 100755 --- a/activerecord/test/abstract_unit.rb +++ b/activerecord/test/abstract_unit.rb @@ -4,6 +4,7 @@ $:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib') require 'test/unit' require 'active_record' require 'active_record/fixtures' +require 'active_support/test_case' require 'connection' # Show backtraces for deprecated behavior for quicker cleanup. diff --git a/activerecord/test/fixtures_test.rb b/activerecord/test/fixtures_test.rb index 2bc72d0b4e..40790a607d 100755 --- a/activerecord/test/fixtures_test.rb +++ b/activerecord/test/fixtures_test.rb @@ -417,7 +417,7 @@ class FixturesBrokenRollbackTest < Test::Unit::TestCase end class LoadAllFixturesTest < Test::Unit::TestCase - write_inheritable_attribute :fixture_path, File.join(File.dirname(__FILE__), '/fixtures/all') + self.fixture_path= File.join(File.dirname(__FILE__), '/fixtures/all') fixtures :all def test_all_there @@ -529,3 +529,13 @@ class FoxyFixturesTest < Test::Unit::TestCase assert_equal("frederick", parrots(:frederick).name) end end + +class ActiveSupportSubclassWithFixturesTest < ActiveSupport::TestCase + fixtures :parrots + + # This seemingly useless assertion catches a bug that caused the fixtures + # setup code call nil[] + def test_foo + assert_equal parrots(:louis), Parrot.find_by_name("King Louis") + end +end
\ No newline at end of file |