Skip to content

Instantly share code, notes, and snippets.

@flazz
Created July 16, 2009 17:36
Show Gist options
  • Save flazz/148551 to your computer and use it in GitHub Desktop.
Save flazz/148551 to your computer and use it in GitHub Desktop.
last_response.body.should have_selector('h2') do |tag|
tag.should match_selector('.disabled')
tag.should contain('document is not well-formed')
end
# cucumber/rack-test output
expected following output to contain a <.disabled/> tag:
<h2 class="disabled">document is not well-formed</h2> (Spec::Expectations::ExpectationNotMetError)
./features/step_definitions/validation/validation_heading_steps.rb:8:in `__instance_exec0'
./features/step_definitions/validation/validation_heading_steps.rb:7:in `/^all headings except well formedness are visually disabled$/'
features/validation_heading.feature:9:in `Then all headings except well formedness are visually disabled'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment