Class: Kombu::RSpec::Matchers::ComponentRenderedMatcher::Matcher
- Inherits:
-
Object
- Object
- Kombu::RSpec::Matchers::ComponentRenderedMatcher::Matcher
- Defined in:
- lib/kombu/test/rspec/matchers/component_rendered_matcher.rb
Instance Method Summary collapse
- #failure_message ⇒ Object
-
#initialize(component, entry: nil, mount_element_id: nil, attributes: {}) ⇒ Matcher
constructor
A new instance of Matcher.
- #matches?(controller) ⇒ Boolean
Constructor Details
#initialize(component, entry: nil, mount_element_id: nil, attributes: {}) ⇒ Matcher
Returns a new instance of Matcher.
12 13 14 15 16 17 |
# File 'lib/kombu/test/rspec/matchers/component_rendered_matcher.rb', line 12 def initialize(component, entry: nil, mount_element_id: nil, attributes: {}) @expected_component = component @expected_entry = entry @expected_mount_element_id = mount_element_id @expected_attributes = attributes end |
Instance Method Details
#failure_message ⇒ Object
24 25 26 27 28 29 |
# File 'lib/kombu/test/rspec/matchers/component_rendered_matcher.rb', line 24 def return unless component_match? return unless attributes_match? return unless entry_match? unless mount_element_id_match? end |
#matches?(controller) ⇒ Boolean
19 20 21 22 |
# File 'lib/kombu/test/rspec/matchers/component_rendered_matcher.rb', line 19 def matches?(controller) set_actual_avaliables(controller) component_match? && entry_match? && mount_element_id_match? && attributes_match? end |