| Module | Merb::Test::Rspec::ViewMatchers |
| In: |
lib/merb-core/test/matchers/view_matchers.rb
|
| expected<String>: | The string to look for. |
| HaveSelector: | A new have selector matcher. |
RSpec matcher to test for the presence of tags.
| tag<~to_s>: | The name of the tag. |
| attributes<Hash>: | Tag attributes. |
| HasTag: | A new has tag matcher. |
# Check for <div>
body.should have_tag("div")
# Check for <span id="notice">
body.should have_tag("span", :id => :notice)
# Check for <h1 id="foo" class="bar">
body.should have_tag(:h2, :class => "bar", :id => "foo")
# Check for <div attr="val">
body.should have_tag(:div, :attr => :val)
| attrs<Hash>: | A set of attributes that must not be matched. |
| NotMatchTag: | A new not match tag matcher. |