Class: React::Test::Matchers::RenderHTMLMatcher
- Defined in:
- lib/react/test/matchers/render_html_matcher.rb
Instance Method Summary collapse
- #failure_message ⇒ Object
- #failure_message_when_negated ⇒ Object (also: #negative_failure_message)
-
#initialize(expected) ⇒ RenderHTMLMatcher
constructor
A new instance of RenderHTMLMatcher.
- #matches?(component) ⇒ Boolean
- #with_params(params) ⇒ Object
Constructor Details
#initialize(expected) ⇒ RenderHTMLMatcher
Returns a new instance of RenderHTMLMatcher.
5 6 7 8 |
# File 'lib/react/test/matchers/render_html_matcher.rb', line 5 def initialize(expected) @expected = expected @params = {} end |
Instance Method Details
#failure_message ⇒ Object
21 22 23 |
# File 'lib/react/test/matchers/render_html_matcher.rb', line 21 def failure_string end |
#failure_message_when_negated ⇒ Object Also known as: negative_failure_message
25 26 27 |
# File 'lib/react/test/matchers/render_html_matcher.rb', line 25 def failure_string(:negative) end |
#matches?(component) ⇒ Boolean
15 16 17 18 19 |
# File 'lib/react/test/matchers/render_html_matcher.rb', line 15 def matches?(component) @component = component @actual = render_to_html @expected == @actual end |
#with_params(params) ⇒ Object
10 11 12 13 |
# File 'lib/react/test/matchers/render_html_matcher.rb', line 10 def with_params(params) @params = params self end |