aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rwxr-xr-xactiverecord/test/fixtures_test.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/activerecord/test/fixtures_test.rb b/activerecord/test/fixtures_test.rb
index c1e79b807f..79023ac838 100755
--- a/activerecord/test/fixtures_test.rb
+++ b/activerecord/test/fixtures_test.rb
@@ -324,6 +324,30 @@ class MultipleFixturesTest < Test::Unit::TestCase
end
end
+class SetupTest < Test::Unit::TestCase
+ # fixtures :topics
+
+ def setup
+ @first = true
+ end
+
+ def test_nothing
+ end
+end
+
+class SetupSubclassTest < SetupTest
+ def setup
+ super
+ @second = true
+ end
+
+ def test_subclassing_should_preserve_setups
+ assert @first
+ assert @second
+ end
+end
+
+
class OverlappingFixturesTest < Test::Unit::TestCase
fixtures :topics, :developers
fixtures :developers, :accounts