Permalink
Browse files

add passing test for Test::Unit subclasses running #setup properly [b…

…rynary]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8445 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 0b84af9 commit 5dc831fd9a303489c1260374e0b8a26fa6b8b44f @technoweenie technoweenie committed Dec 19, 2007
Showing with 24 additions and 0 deletions.
  1. +24 −0 activerecord/test/fixtures_test.rb
@@ -324,6 +324,30 @@ def test_fixture_table_names
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

0 comments on commit 5dc831f

Please sign in to comment.