test sitemap removal
This commit is contained in:
parent
e496d228b0
commit
aee8e32524
|
@ -16,3 +16,14 @@ Feature: Preview Changes
|
||||||
When I go to "/content.html"
|
When I go to "/content.html"
|
||||||
Then I should see "Hola Mundo"
|
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
|
end
|
||||||
|
|
||||||
Then /^the file "([^\"]*)" has the contents$/ do |path, contents|
|
Then /^the file "([^\"]*)" has the contents$/ do |path, contents|
|
||||||
file_path = File.expand_path(path, @target)
|
write_file(path, contents)
|
||||||
File.open(file_path, 'w') { |f| f.write(contents) }
|
|
||||||
step %Q{the file "#{path}" did change}
|
step %Q{the file "#{path}" did change}
|
||||||
end
|
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|
|
Then /^the file "([^\"]*)" did change$/ do |path|
|
||||||
@server_inst.file_did_change(path)
|
@server_inst.file_did_change(path)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Then /^the file "([^\"]*)" did delete$/ do |path|
|
||||||
|
@server_inst.file_did_delete(path)
|
||||||
|
end
|
Loading…
Reference in a new issue