Sha256: 574c464f9c042b0982f76425ed55a0a97568f6b72c77cf4e0341f49ef145798c
Contents?: true
Size: 1.95 KB
Versions: 2
Compression:
Stored size: 1.95 KB
Contents
Given /^I am in (.*)$/ do |example_dir_relative_path| @current_dir = examples_dir(example_dir_relative_path) end Given /^a standard Cucumber project directory structure$/ do @current_dir = working_dir in_current_dir do FileUtils.mkdir_p 'features/support' FileUtils.mkdir 'features/step_definitions' end end Given /^a file named "([^\"]*)"$/ do |file_name| create_file(file_name, '') end Given /^a file named "([^\"]*)" with:$/ do |file_name, file_content| create_file(file_name, file_content) end Given /^the following profiles? (?:are|is) defined:$/ do |profiles| create_file('cucumber.yml', profiles) end When /^I run cucumber (.*)$/ do |cucumber_opts| run "#{Cucumber::RUBY_BINARY} #{Cucumber::BINARY} --no-color #{cucumber_opts}" end When /^I run rake (.*)$/ do |rake_opts| run "rake #{rake_opts} --trace" end Then /^it should (fail|pass)$/ do |success| if success == 'fail' last_exit_status.should_not == 0 else if last_exit_status != 0 raise "Failed with exit status #{last_exit_status}\nSTDOUT:\n#{last_stdout}\nSTDERR:\n#{last_stderr}" end end end Then /^it should (fail|pass) with$/ do |success, output| last_stdout.should == output Then("it should #{success}") end Then /^the output should contain$/ do |text| last_stdout.should include(text) end Then /^the output should not contain$/ do |text| last_stdout.should_not include(text) 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 Then /^STDERR should match$/ do |text| last_stderr.should =~ /#{text}/ end Then /^"(.*)" should exist$/ do |file| File.exists?(file).should be_true FileUtils.rm(file) end Then /^"([^\"]*)" should not be required$/ do |file_name| last_stdout.should_not include("* #{file_name}") end Then /^"([^\"]*)" should be required$/ do |file_name| last_stdout.should include("* #{file_name}") end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
aslakhellesoy-cucumber-0.3.3.3 | features/step_definitions/cucumber_steps.rb |
aslakhellesoy-cucumber-0.3.3.4 | features/step_definitions/cucumber_steps.rb |