Given /^a blog with content exists$/ do create_sample_blog run_simple 'staticpress create_page about' run_simple 'staticpress create hello-goodbye' end Given /^the site is not built or deployed$/ do files = [ 'public/index.html', 'public/about/index.html', '../deployed/index.html', '../deployed/about/index.html' ] check_file_presence files, false end When /^I create a simple page with multiple formats$/ do write_file 'content/formats.markdown.erb', 'hello world' end When /^(I )?(\w+) the site$/ do |ignored, action| run_simple "staticpress #{action}" end When /^I list my blog's URLs$/ do run_simple 'staticpress list url_path' end When /^I build the site verbosely$/ do run_simple 'staticpress build --verbose' end When /^I create a custom home page$/ do write_file 'content/index.markdown', <<-MARKDOWN --- title: Custom Home Page --- in custom page MARKDOWN end When /^I add a custom deployment strategy$/ do append_to_file 'config.yml', <<-YAML :deployment_strategies: :custom: 'cp -R public ../deployed' YAML end Then /^the formats page only contains markup$/ do check_exact_file_content 'public/formats/index.html', <<-HTML
hello world
in custom page