Sha256: 7db2f9c44ded633934be6e624c64c901c7382444ac3b3f1870c522f10bd3073d

Contents?: true

Size: 1.69 KB

Versions: 80

Compression:

Stored size: 1.69 KB

Contents

require 'spec/expectations'

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 should see a multiline string like$/ do |s|
  s.should == %{A string
that spans
several lines}
end

Given /^the following users exist in the system$/ do |table|
  table.hashes[0][:role_assignments].should == 'HUMAN RESOURCE'
end

Given /^I have a pending step$/ do
  pending
end

When /^I run this feature with the progress format$/ do
  pending
end

Then /^I should get a no method error for 'backtrace_line'$/ do
  pending
end

Then /the table should be different with table:/ do |expected|
  expected.diff!(table(%{
    | b     | c    | a     | d |
    | KASHA | AIIT | BOOYA | X |
    | four  | five | three | Y |
  }), :coldiff => true)
end

Then /the table should be different with array:/ do |expected|
  expected.diff!([
    {'a' => 'BOOYA', 'b' => 'KASHA'},
    {'a' => 'three', 'b' => 'four'},
  ])
end

Version data entries

80 entries across 80 versions & 11 rubygems

Version Path
aslakhellesoy-cucumber-0.3.100 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.101.2 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.101 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.102.1 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.102.2 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.102 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.103 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.104 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.11.200907091518 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.90 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.92 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.93.1 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.93 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.94.1 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.94 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.95 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.96 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.97 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.98 examples/tickets/features/step_definitons/tickets_steps.rb
aslakhellesoy-cucumber-0.3.99 examples/tickets/features/step_definitons/tickets_steps.rb