Sha256: 5b87442fb5a4cdf655bfe955713443a57fca449e4f9b6f453beceebc1ce9a0b0

Contents?: true

Size: 680 Bytes

Versions: 31

Compression:

Stored size: 680 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper.rb'

class TestNestedLifecycle < Test::Unit::TestCase
  before :all  do
    @var = 0
  end
  
  before do
    @var += 1
  end
  context "A new context" do
    before do
      @var += 1
    end
    
    before :all do
      @var = 0
    end
    
    context "A nested context" do
      before do
        @var += 1
      end
      
      before :all do
        @var += 1
      end

      context "A second, nested context" do
        before do
          @var += 1
        end

        before :all do
          @var += 1
        end

        it "should set var" do
          assert_equal 6, @var
        end
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 5 rubygems

Version Path
auser-poolparty-1.3.0 vendor/gems/context/test/test_nested_lifecycle.rb
auser-poolparty-1.3.1 vendor/gems/context/test/test_nested_lifecycle.rb
auser-poolparty-1.3.10 vendor/gems/context/test/test_nested_lifecycle.rb
auser-poolparty-1.3.11 vendor/gems/context/test/test_nested_lifecycle.rb
auser-poolparty-1.3.12 vendor/gems/context/test/test_nested_lifecycle.rb
auser-poolparty-1.3.13 vendor/gems/context/test/test_nested_lifecycle.rb
auser-poolparty-1.3.14 vendor/gems/context/test/test_nested_lifecycle.rb
auser-poolparty-1.3.15 vendor/gems/context/test/test_nested_lifecycle.rb
auser-poolparty-1.3.16 vendor/gems/context/test/test_nested_lifecycle.rb
auser-poolparty-1.3.17 vendor/gems/context/test/test_nested_lifecycle.rb
auser-poolparty-1.3.2 vendor/gems/context/test/test_nested_lifecycle.rb
auser-poolparty-1.3.3 vendor/gems/context/test/test_nested_lifecycle.rb
auser-poolparty-1.3.4 vendor/gems/context/test/test_nested_lifecycle.rb
auser-poolparty-1.3.5 vendor/gems/context/test/test_nested_lifecycle.rb
auser-poolparty-1.3.6 vendor/gems/context/test/test_nested_lifecycle.rb
auser-poolparty-1.3.7 vendor/gems/context/test/test_nested_lifecycle.rb
auser-poolparty-1.3.8 vendor/gems/context/test/test_nested_lifecycle.rb
fairchild-poolparty-1.3.17 vendor/gems/context/test/test_nested_lifecycle.rb
fairchild-poolparty-1.3.5 vendor/gems/context/test/test_nested_lifecycle.rb
tu-context-0.5.8 test/test_nested_lifecycle.rb