Sha256: b1c8d11516201538f639246ac0da9aaff956c91c784d26c01456f9c61c5032a4
Contents?: true
Size: 1.15 KB
Versions: 2
Compression:
Stored size: 1.15 KB
Contents
When /^I run "([^\"]*)"$/ do |command| system("cd #{@current_directory} && #{command}").should be_true end When /^I add "([^\"]*)" to file "([^\"]*)"$/ do |content, short_path| path = File.join(@current_directory, short_path) File.should exist(path) File.open(path, 'a') { |f| f.write(content + "\n") } end Then /^I should see file "([^\"]*)"$/ do |path| File.should exist(File.join(@current_directory, path)) end Then /^I should see "(.*)" in file "([^\"]*)"$/ do |content, short_path| path = File.join(@current_directory, short_path) File.should exist(path) File.readlines(path).join.should include(content) end Then /^I should see the following files$/ do |table| table.raw.flatten.each do |path| File.should exist(File.join(@current_directory, path)) end end Then /^I should see the following in file "([^\"]*)"$/ do |short_path, table| path = File.join(@current_directory, short_path) File.should exist(path) table.raw.flatten.each do |content| File.readlines(path).join.should include(content) end end Then /^I should successfully run "([^\"]*)"$/ do |command| system("cd #{@current_directory} && #{command}").should be_true end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
html5_layout-0.0.3 | features/step_definitions/common_steps.rb |
nifty-generators-0.4.1 | features/step_definitions/common_steps.rb |