middleman/lib/middleman/step_definitions/middleman_steps.rb
2011-12-15 16:05:15 -08:00

15 lines
No EOL
437 B
Ruby

require "fileutils"
Given /^a project at "([^\"]*)"$/ do |dirname|
@target = File.join(PROJECT_ROOT_PATH, "fixtures", dirname)
end
Then /^the file "([^\"]*)" has the contents$/ do |path, contents|
file_path = File.expand_path(path, @target)
File.open(file_path, 'w') { |f| f.write(contents) }
step %Q{the file "#{path}" did change}
end
Then /^the file "([^\"]*)" did change$/ do |path|
@server_inst.file_did_change(path)
end