Sha256: d38123f23197bfef31191e4a0fbf38dc9b2c731f8449d8899cb840621deb6a70

Contents?: true

Size: 939 Bytes

Versions: 14

Compression:

Stored size: 939 Bytes

Contents

Feature: At exit during each run
  In order to make sure at_exit hooks defined during the run get called
  I want to override kernel #at_exit

  Scenario: at exit

    Given a file named "spec/spec_helper.rb" with:
      """
      require 'rubygems'
      require 'spec'
      Spork.prefork do
        puts "loading"
        at_exit { puts "prefork at_exit called" }
      end

      Spork.each_run do
        puts "running"
        at_exit { printf "first " }
        at_exit { printf "second " }
      end

      """

    And a file named "spec/did_it_work_spec.rb" with:
      """
      describe "Did it work?" do
        it "checks to see if all worked" do
          puts "ran specs"
        end
      end
      """
    When I fire up a spork instance with "spork rspec"
    And I run spec --drb spec/did_it_work_spec.rb
    Then the output should contain "second first"
    Then the output should not contain "prefork at_exit called"

Version data entries

14 entries across 14 versions & 4 rubygems

Version Path
panjiva-spork-0.8.6 features/at_exit_during_each_run.feature
panjiva-spork-0.8.5.1 features/at_exit_during_each_run.feature
panjiva-spork-0.8.5 features/at_exit_during_each_run.feature
spork-0.8.5 features/at_exit_during_each_run.feature
invo-sporknife-0.1.0.3 features/at_exit_during_each_run.feature
invo-sporknife-0.1.0.2 features/at_exit_during_each_run.feature
wakiki-spork-0.8.5 features/at_exit_during_each_run.feature
spork-0.8.4 features/at_exit_during_each_run.feature
spork-0.8.3 features/at_exit_during_each_run.feature
spork-0.8.2 features/at_exit_during_each_run.feature
spork-0.8.1 features/at_exit_during_each_run.feature
spork-0.8.0 features/at_exit_during_each_run.feature
spork-0.7.8 features/at_exit_during_each_run.feature
spork-0.7.7 features/at_exit_during_each_run.feature