Class: ViewMatchers::FormMatcher
- Inherits:
-
Object
- Object
- ViewMatchers::FormMatcher
- Defined in:
- lib/view_matchers/form_matcher.rb
Instance Method Summary collapse
- #failure_message ⇒ Object
- #failure_message_when_negated ⇒ Object
-
#initialize(expected) ⇒ FormMatcher
constructor
A new instance of FormMatcher.
- #matches?(rendered) ⇒ Boolean
Constructor Details
#initialize(expected) ⇒ FormMatcher
Returns a new instance of FormMatcher.
5 6 7 |
# File 'lib/view_matchers/form_matcher.rb', line 5 def initialize(expected) @expected = Form.new(expected) end |
Instance Method Details
#failure_message ⇒ Object
13 14 15 16 |
# File 'lib/view_matchers/form_matcher.rb', line 13 def "the following expected tags did not exist:\n" << end |
#failure_message_when_negated ⇒ Object
18 19 20 21 |
# File 'lib/view_matchers/form_matcher.rb', line 18 def "the following not expected tags actually did exist:\n" << end |
#matches?(rendered) ⇒ Boolean
9 10 11 |
# File 'lib/view_matchers/form_matcher.rb', line 9 def matches?(rendered) expectation_exists_in_rendered? rendered end |