Sha256: c0844e5cc00f25f5de20436f2c2af4661d27ef8181866cf3145261735f9a5b48

Contents?: true

Size: 825 Bytes

Versions: 14

Compression:

Stored size: 825 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper'

module Spec
  module DSL
    describe BehaviourEval do
      def count
        @count ||= 0
        @count = @count + 1
        @count
      end

      before(:all) do
        count.should == 1
      end

      before(:all) do
        count.should == 2
      end

      before(:each) do
        count.should == 3
      end

      before(:each) do
        count.should == 4
      end

      it "should run before(:all), before(:each), example, after(:each), after(:all) in order" do
        count.should == 5
      end

      after(:each) do
        count.should == 7
      end

      after(:each) do
        count.should == 6
      end

      after(:all) do
        count.should == 9
      end

      after(:all) do
        count.should == 8
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
has_finder-0.1.1 spec/rails/vendor/plugins/rspec/spec/spec/dsl/behaviour_eval_spec.rb
has_finder-0.1.2 spec/rails/vendor/plugins/rspec/spec/spec/dsl/behaviour_eval_spec.rb
has_finder-0.1.3 spec/rails/vendor/plugins/rspec/spec/spec/dsl/behaviour_eval_spec.rb
rspec-0.9.0 spec/spec/dsl/behaviour_eval_spec.rb
rspec-0.9.1 spec/spec/dsl/behaviour_eval_spec.rb
rspec-0.9.2 spec/spec/dsl/behaviour_eval_spec.rb
rspec-0.9.3 spec/spec/dsl/behaviour_eval_spec.rb
rspec-0.9.4 spec/spec/dsl/behaviour_eval_spec.rb
rspec-1.0.0 spec/spec/dsl/behaviour_eval_spec.rb
rspec-1.0.1 spec/spec/dsl/behaviour_eval_spec.rb
rspec-1.0.2 spec/spec/dsl/behaviour_eval_spec.rb
rspec-1.0.3 spec/spec/dsl/behaviour_eval_spec.rb
rspec-1.0.4 spec/spec/dsl/behaviour_eval_spec.rb
rspec-1.0.5 spec/spec/dsl/behaviour_eval_spec.rb