diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-12-19 22:49:27 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-12-19 22:49:27 +0000 |
commit | 5dc831fd9a303489c1260374e0b8a26fa6b8b44f (patch) | |
tree | 90c5fe213b7a3eb61497c54442a28a1afd9cbfa6 /activerecord | |
parent | 0b84af9599d624f563a41bc13ed318ddc457efb1 (diff) | |
download | rails-5dc831fd9a303489c1260374e0b8a26fa6b8b44f.tar.gz rails-5dc831fd9a303489c1260374e0b8a26fa6b8b44f.tar.bz2 rails-5dc831fd9a303489c1260374e0b8a26fa6b8b44f.zip |
add passing test for Test::Unit subclasses running #setup properly [brynary]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8445 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rwxr-xr-x | activerecord/test/fixtures_test.rb | 24 |
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 |