Sha256: b8f2e9ac12440ed9968ac89ae75f1a12422823a3d6aea4dcbad6d15f7571e3be

Contents?: true

Size: 672 Bytes

Versions: 8

Compression:

Stored size: 672 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} #{cmd}"
    @out = `#{@full_cmd}`
    @status = $?.exitstatus
  end
end

Then /^it should (fail|pass) with$/ do |success, output|
  @out.should == output
  code = success == 'fail' ? 1 : 0
  @status.should == code
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

8 entries across 8 versions & 3 rubygems

Version Path
aslakhellesoy-cucumber-0.1.16.1 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.16.2 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.16.3 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.16.4 features/step_definitions/cucumber_steps.rb
aslakhellesoy-cucumber-0.1.16 features/step_definitions/cucumber_steps.rb
kosmas58-cucumber-0.1.16.5 features/step_definitions/cucumber_steps.rb
kosmas58-cucumber-0.1.16.6 features/step_definitions/cucumber_steps.rb
cucumber-0.1.16 features/step_definitions/cucumber_steps.rb