Sha256: e781f3267263d34d8875038e0afd495aacafcf598b08fd6c4c84e8297812de9f

Contents?: true

Size: 969 Bytes

Versions: 87

Compression:

Stored size: 969 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 'rspec'
      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:
      """
      require 'spec_helper'
      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 rspec --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

87 entries across 87 versions & 5 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/spork-0.9.0/features/at_exit_during_each_run.feature
classiccms-0.7.4 vendor/bundle/gems/spork-0.9.0/features/at_exit_during_each_run.feature
classiccms-0.7.3 vendor/bundle/gems/spork-0.9.0/features/at_exit_during_each_run.feature
spork-1.0.0rc4 features/at_exit_during_each_run.feature
spork-1.0.0rc4-x86-mswin32 features/at_exit_during_each_run.feature
spork-1.0.0rc4-x86-mingw32 features/at_exit_during_each_run.feature
classiccms-0.7.2 vendor/bundle/gems/spork-0.9.0/features/at_exit_during_each_run.feature
classiccms-0.7.1 vendor/bundle/gems/spork-0.9.0/features/at_exit_during_each_run.feature
classiccms-0.7.0 vendor/bundle/gems/spork-0.9.0/features/at_exit_during_each_run.feature
classiccms-0.6.9 vendor/bundle/gems/spork-0.9.0/features/at_exit_during_each_run.feature
classiccms-0.6.8 vendor/bundle/gems/spork-0.9.0/features/at_exit_during_each_run.feature
classiccms-0.6.7 vendor/bundle/gems/spork-0.9.0/features/at_exit_during_each_run.feature
classiccms-0.6.6 vendor/bundle/gems/spork-0.9.0/features/at_exit_during_each_run.feature
classiccms-0.6.5 vendor/bundle/gems/spork-0.9.0/features/at_exit_during_each_run.feature
classiccms-0.6.4 vendor/bundle/gems/spork-0.9.0/features/at_exit_during_each_run.feature
classiccms-0.6.3 vendor/bundle/gems/spork-0.9.0/features/at_exit_during_each_run.feature
classiccms-0.6.2 vendor/bundle/gems/spork-0.9.0/features/at_exit_during_each_run.feature
classiccms-0.6.1 vendor/bundle/gems/spork-0.9.0/features/at_exit_during_each_run.feature
classiccms-0.6.0 vendor/bundle/gems/spork-0.9.0/features/at_exit_during_each_run.feature
classiccms-0.5.17 vendor/bundle/gems/spork-0.9.0/features/at_exit_during_each_run.feature