Sha256: 057b66cc8d252d7ccbcc5daaf538677a292c104dfa1e92e251b68b53214cbe84

Contents?: true

Size: 722 Bytes

Versions: 21

Compression:

Stored size: 722 Bytes

Contents

Given /^I am in (.*)$/ do |dir|
  @dir = dir
end

When /^I run cucumber (.*)$/ do |cmd|
  @dir ||= 'self_test'
  full_dir ||= File.expand_path(File.dirname(__FILE__) + "/../../examples/#{@dir}")
  Dir.chdir(full_dir) do
    @full_cmd = "#{Cucumber::RUBY_BINARY} #{Cucumber::BINARY} --no-color #{cmd}"
    @out = `#{@full_cmd}`
    @status = $?.exitstatus
  end
end

Then /^it should (fail|pass) with$/ do |success, output|
#puts @out
  @out.should == output
  if success == 'fail'
    @status.should_not == 0
  else
    @status.should == 0
  end
end

Then /^(.*) should contain$/ do |file, text|
  IO.read(file).should == text
end

Then /^(.*) should match$/ do |file, text|
  IO.read(file).should =~ Regexp.new(text)
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
aslakhellesoy-cucumber-0.1.16.5 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.1 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.10 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.11 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.12 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.13 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.14 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.15 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.17 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.18 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.19 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.2 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.20 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.21 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.3 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.5 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.6 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.7 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.8 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.99.9 features/step_definitions/cucumber_steps.rb