middleman/middleman-core/lib/middleman-core/step_definitions/middleman_steps.rb

23 lines
593 B
Ruby
Raw Normal View History

require "fileutils"
2011-11-30 07:12:33 +01:00
Given /^a project at "([^\"]*)"$/ do |dirname|
@target = File.join(PROJECT_ROOT_PATH, "fixtures", dirname)
2011-11-30 07:26:01 +01:00
end
Then /^the file "([^\"]*)" has the contents$/ do |path, contents|
2011-12-31 21:56:17 +01:00
write_file(path, contents)
2011-11-30 07:26:01 +01:00
step %Q{the file "#{path}" did change}
end
2011-12-31 21:56:17 +01:00
Then /^the file "([^\"]*)" is removed$/ do |path|
step %Q{I remove the file "#{path}"}
step %Q{the file "#{path}" did delete}
end
2011-11-30 07:26:01 +01:00
Then /^the file "([^\"]*)" did change$/ do |path|
@server_inst.file_did_change(path)
2011-12-31 21:56:17 +01:00
end
Then /^the file "([^\"]*)" did delete$/ do |path|
@server_inst.file_did_delete(path)
2011-11-30 07:12:33 +01:00
end