aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/fixtures_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/fixtures_test.rb')
-rwxr-xr-xactiverecord/test/fixtures_test.rb12
1 files changed, 11 insertions, 1 deletions
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