Class: Downstream::HaveEnqueuedAsyncSubscriberFor::EventMatcher
- Inherits:
-
Object
- Object
- Downstream::HaveEnqueuedAsyncSubscriberFor::EventMatcher
- Includes:
- RSpec::Matchers::Composable
- Defined in:
- lib/downstream/rspec/have_enqueued_async_subscriber_for.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
Instance Method Summary collapse
- #description ⇒ Object
-
#initialize(event) ⇒ EventMatcher
constructor
A new instance of EventMatcher.
- #matches?(actual) ⇒ Boolean
Constructor Details
#initialize(event) ⇒ EventMatcher
Returns a new instance of EventMatcher.
12 13 14 |
# File 'lib/downstream/rspec/have_enqueued_async_subscriber_for.rb', line 12 def initialize(event) @event = event end |
Instance Attribute Details
#event ⇒ Object (readonly)
Returns the value of attribute event.
10 11 12 |
# File 'lib/downstream/rspec/have_enqueued_async_subscriber_for.rb', line 10 def event @event end |
Instance Method Details
#description ⇒ Object
20 21 22 |
# File 'lib/downstream/rspec/have_enqueued_async_subscriber_for.rb', line 20 def description "be #{event.inspect}" end |
#matches?(actual) ⇒ Boolean
16 17 18 |
# File 'lib/downstream/rspec/have_enqueued_async_subscriber_for.rb', line 16 def matches?(actual) actual == event end |