Class: HaveNotifiedWith
- Inherits:
-
Object
- Object
- HaveNotifiedWith
- Defined in:
- lib/heroku_notification/rspec.rb
Instance Method Summary collapse
- #failure_message ⇒ Object
-
#initialize(params) ⇒ HaveNotifiedWith
constructor
A new instance of HaveNotifiedWith.
- #matches?(target) ⇒ Boolean
- #negative_failure_message ⇒ Object
Constructor Details
#initialize(params) ⇒ HaveNotifiedWith
Returns a new instance of HaveNotifiedWith.
4 5 6 |
# File 'lib/heroku_notification/rspec.rb', line 4 def initialize(params) @params = params end |
Instance Method Details
#failure_message ⇒ Object
15 16 17 |
# File 'lib/heroku_notification/rspec.rb', line 15 def "expected Notification to be posted with #{@params.inspect}" end |
#matches?(target) ⇒ Boolean
8 9 10 11 12 13 |
# File 'lib/heroku_notification/rspec.rb', line 8 def matches?(target) assert_notified_with(@params) true rescue Spec::Expectations::ExpectationNotMetError false end |
#negative_failure_message ⇒ Object
18 19 20 |
# File 'lib/heroku_notification/rspec.rb', line 18 def "expected Notification to not be posted with #{@params.inspect}" end |