test sitemap removal
This commit is contained in:
parent
e496d228b0
commit
aee8e32524
|
@ -15,4 +15,15 @@ Feature: Preview Changes
|
|||
"""
|
||||
When I go to "/content.html"
|
||||
Then I should see "Hola Mundo"
|
||||
|
||||
|
||||
Scenario: A template is removed during preview
|
||||
Given the Server is running at "preview-app"
|
||||
And the file "source/a-page.html.erb" has the contents
|
||||
"""
|
||||
Hello World
|
||||
"""
|
||||
When I go to "/a-page.html"
|
||||
Then I should see "Hello World"
|
||||
And the file "source/a-page.html.erb" is removed
|
||||
When I go to "/a-page.html"
|
||||
Then I should see "File Not Found"
|
||||
|
|
|
@ -5,11 +5,19 @@ Given /^a project at "([^\"]*)"$/ do |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) }
|
||||
write_file(path, contents)
|
||||
step %Q{the file "#{path}" did change}
|
||||
end
|
||||
|
||||
Then /^the file "([^\"]*)" is removed$/ do |path|
|
||||
step %Q{I remove the file "#{path}"}
|
||||
step %Q{the file "#{path}" did delete}
|
||||
end
|
||||
|
||||
Then /^the file "([^\"]*)" did change$/ do |path|
|
||||
@server_inst.file_did_change(path)
|
||||
end
|
||||
|
||||
Then /^the file "([^\"]*)" did delete$/ do |path|
|
||||
@server_inst.file_did_delete(path)
|
||||
end
|
Loading…
Reference in a new issue