mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user