Module: Superbolt::SpecHelpers
- Defined in:
- lib/superbolt/spec_helpers.rb
Instance Method Summary collapse
- #last_superbolt_message ⇒ Object
- #messenger_class ⇒ Object
- #stub_superbolt_messenger ⇒ Object
- #superbolt_message ⇒ Object
- #superbolt_messages ⇒ Object
Instance Method Details
#last_superbolt_message ⇒ Object
13 14 15 |
# File 'lib/superbolt/spec_helpers.rb', line 13 def .last end |
#messenger_class ⇒ Object
25 26 27 |
# File 'lib/superbolt/spec_helpers.rb', line 25 def messenger_class Superbolt::Messenger end |
#stub_superbolt_messenger ⇒ Object
21 22 23 |
# File 'lib/superbolt/spec_helpers.rb', line 21 def stub_superbolt_messenger allow(Superbolt).to receive(:message) { |args| } end |
#superbolt_message ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/superbolt/spec_helpers.rb', line 3 def = messenger_class.new allow().to receive(:send!) do |args| .data(args) << end end |
#superbolt_messages ⇒ Object
17 18 19 |
# File 'lib/superbolt/spec_helpers.rb', line 17 def @superbolt_messages ||= [] end |