Created
December 17, 2010 18:18
-
-
Save mxriverlynn/745422 to your computer and use it in GitHub Desktop.
Verifying generated html with HAML, Cucubmer, Capybara and RSpec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
haml_file = "path/to/my/filename.haml" | |
haml_data = File.read(haml_file) | |
result = Haml::Engine.new(haml_data).render |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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