Sha256: eba1725abdf16058b459d33f4c33052af28ba66368a712be47ea86559d997b8e
Contents?: true
Size: 662 Bytes
Versions: 3
Compression:
Stored size: 662 Bytes
Contents
require File.dirname(__FILE__) + "/../lib/contest" class BaseTest < Test::Unit::TestCase def setup @order = [] @order << "Grandparent Setup" end def teardown @order << "Grandparent Teardown" assert_equal ["Grandparent Setup", "Parent Setup", "Child Setup", "Test Case", "Child Teardown", "Parent Teardown", "Grandparent Teardown"], @order end end class MidLayerTest < BaseTest setup { @order << "Parent Setup" } teardown { @order << "Parent Teardown" } end class LeafTest < MidLayerTest setup { @order << "Child Setup" } teardown { @order << "Child Teardown" } test "my actual test" do @order << "Test Case" end end
Version data entries
3 entries across 3 versions & 3 rubygems
Version | Path |
---|---|
mjfreshyfresh-contest-0.0.1 | test/setup_and_teardown_order_test.rb |
mcmire-contest-0.1.3 | test/setup_and_teardown_order_test.rb |
contest-0.1.2 | test/setup_and_teardown_order_test.rb |