Sha256: 130b8d99c4ae7ad2827898b18f9d5e1ecfa7c58cba01690d28793a93bc772970

Contents?: true

Size: 998 Bytes

Versions: 98

Compression:

Stored size: 998 Bytes

Contents

begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end

Given /^I fail$/ do
  raise "BOOM (this is expected)"
end

Given /^I pass$/ do
end

module HookChecks
  def check_failed(scenario)
    scenario.should be_failed
    scenario.should_not be_passed
    scenario.exception.message.should == "BOOM (this is expected)"
  end

  def check_undefined(scenario)
    scenario.should_not be_failed
    scenario.should_not be_passed
  end

  def check_passed(scenario)
    scenario.should_not be_failed
    scenario.should be_passed
  end
end

World(HookChecks)

After('@272_failed') do |scenario|
  check_failed(scenario)
end

After('@272_undefined') do |scenario|
  check_undefined(scenario)
end

After('@272_passed') do |scenario|
  check_passed(scenario)
end

counter = 0
After('@272_outline') do |scenario|
  case(counter)
    when 0
      check_failed(scenario)
    when 1
      check_undefined(scenario)
    when 2
      check_passed(scenario)
  end
  counter +=1
end

Version data entries

98 entries across 94 versions & 12 rubygems

Version Path
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/fixtures/tickets/features/272/hooks_steps.rb
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/fixtures/tickets/features/272/hooks_steps.rb
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/fixtures/tickets/features/272/hooks_steps.rb
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/fixtures/tickets/features/272/hooks_steps.rb
frameworks-capybara-0.2.0.rc2 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/fixtures/tickets/features/272/hooks_steps.rb
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/fixtures/tickets/features/272/hooks_steps.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/cucumber-1.1.9/fixtures/tickets/features/272/hooks_steps.rb
cucumber-1.1.9 fixtures/tickets/features/272/hooks_steps.rb
cucumber-1.1.8 fixtures/tickets/features/272/hooks_steps.rb
cucumber-1.1.7 fixtures/tickets/features/272/hooks_steps.rb
cucumber-1.1.6 fixtures/tickets/features/272/hooks_steps.rb
cucumber-1.1.5 fixtures/tickets/features/272/hooks_steps.rb
cucumber-1.1.4 fixtures/tickets/features/272/hooks_steps.rb
cucumber-1.1.3 fixtures/tickets/features/272/hooks_steps.rb
cucumber-1.1.2 fixtures/tickets/features/272/hooks_steps.rb
cucumber-1.1.1 fixtures/tickets/features/272/hooks_steps.rb
js-log-cucumber-1.0.2 fixtures/tickets/features/272/hooks_steps.rb
cucumber-1.1.0 fixtures/tickets/features/272/hooks_steps.rb
cucumber-1.0.6 fixtures/tickets/features/272/hooks_steps.rb
cucumber-1.0.5 fixtures/tickets/features/272/hooks_steps.rb