Sha256: b484b419185824099de1df3225be4df254c6f1c8b37f028c4ab063e83e0e4785

Contents?: true

Size: 1.11 KB

Versions: 23

Compression:

Stored size: 1.11 KB

Contents

require 'spec/expectations'

World do
  Object.new
end

After do |scenario|
  if scenario.status.index(:failed)
    # Call the BDD police
  end
end

Given "be_empty" do
  [1,2].should_not be_empty
end

Given "nested step is called" do
  Given "I like mushroom", Cucumber::Ast::Table.new([
    %w{sponge bob},
    %w{is cool}
  ])
end

Given 'nested step is called using text table' do
  Given "I like mushroom", table(%{
    | sponge | bob  |
    | is     | cool |
  })

  # Alternative syntax (file and line will be reported on parse error)
  # Given "I like mushroom", table(<<-EOT, __FILE__, __LINE__)
  #   | sponge | bob  |
  #   | is     | cool
  # EOT
end

Given "I like $what" do |what, table|
  @magic = what
  @tool  = table.raw[0][0]
end

Then "nested step should be executed" do
  @magic.should == 'mushroom'
  @tool.should == 'sponge'
end

Given /^the following table$/ do |table|
  @table = table
end

Then /^I should be (\w+) in (\w+)$/ do |key, value|
  hash = @table.hashes[0]
  hash[key].should == value
end

Then /^I shoule see a multiline string like$/ do |s|
  s.should == %{A string
that spans
several lines}
end

Version data entries

23 entries across 23 versions & 3 rubygems

Version Path
aslakhellesoy-cucumber-0.1.100.1 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.100.2 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.10 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.11 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.12 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.13 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.14 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.15 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.17 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.18 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.19 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.20 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.21 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.22 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.23 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.5 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.6 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.7 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.8 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.1.99.9 examples/tickets/features/step_definitons/tickets_steps.rb