Skip to content

Instantly share code, notes, and snippets.

@mxriverlynn
Created December 17, 2010 18:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mxriverlynn/745422 to your computer and use it in GitHub Desktop.
Save mxriverlynn/745422 to your computer and use it in GitHub Desktop.
Verifying generated html with HAML, Cucubmer, Capybara and RSpec
haml_file = "path/to/my/filename.haml"
haml_data = File.read(haml_file)
result = Haml::Engine.new(haml_data).render
# Cucumber step definition file, using Capybara
Then /^I should see the annual physical results$/ do
report = Report.for(assessment)
page.find("body").text.should include report.data
end
# Cucumber step definition file, using Capybara
Then /^I should see the annual physical results$/ do
report = Report.for(assessment)
page.should have_content report.data
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment