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