Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8445

Show
Ignore:
Timestamp:
12/19/07 22:49:27 (2 years ago)
Author:
rick
Message:

add passing test for Test::Unit subclasses running #setup properly [brynary]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/test/fixtures_test.rb

    r8442 r8445  
    325325end 
    326326 
     327class SetupTest < Test::Unit::TestCase 
     328  # fixtures :topics 
     329   
     330  def setup 
     331    @first = true 
     332  end 
     333   
     334  def test_nothing 
     335  end 
     336end 
     337 
     338class SetupSubclassTest < SetupTest 
     339  def setup 
     340    super 
     341    @second = true 
     342  end 
     343   
     344  def test_subclassing_should_preserve_setups 
     345    assert @first 
     346    assert @second 
     347  end 
     348end 
     349 
     350 
    327351class OverlappingFixturesTest < Test::Unit::TestCase 
    328352  fixtures :topics, :developers