spec/support/punchblock_mocks.rb in adhearsion-2.6.4 vs spec/support/punchblock_mocks.rb in adhearsion-3.0.0.beta1

- old
+ new

@@ -5,5 +5,17 @@ double("Offer: #{id}").tap do |offer| allow(offer).to receive_messages :call_id => id, :headers => headers offer.as_null_object end end + +module HasMockCallbackConnection + def self.included(test_case) + test_case.let(:connection) do + double('Connection').tap do |mc| + allow(mc).to receive :handle_event do |event| + original_command.add_event event + end + end + end + end +end