Sha256: b34a2f8447f4d585ef8a5e00b709e6e9ce3e8eaad9a1701c7c7da72ffbb5f92c

Contents?: true

Size: 939 Bytes

Versions: 132

Compression:

Stored size: 939 Bytes

Contents

require 'spec/expectations'

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

132 entries across 132 versions & 13 rubygems

Version Path
aslakhellesoy-cucumber-0.3.0.1 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.1.1 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.1 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.10 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.100 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.101.2 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.101 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.102.1 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.102.2 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.102 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.103 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.104 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.11.1 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.11.200907091518 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.11.3 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.11.5 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.11.6 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.11 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.2 examples/tickets/features/272/hooks_steps.rb
aslakhellesoy-cucumber-0.3.3.1 examples/tickets/features/272/hooks_steps.rb