Sha256: 0569c21af2a3beeac13c287e0490df1657e8ba1468ceec5d5caadafaccc59f70

Contents?: true

Size: 293 Bytes

Versions: 7

Compression:

Stored size: 293 Bytes

Contents

# encoding: utf-8

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
punchblock-2.7.5 spec/support/mock_connection_with_event_handler.rb
punchblock-2.7.3 spec/support/mock_connection_with_event_handler.rb
punchblock-2.7.2 spec/support/mock_connection_with_event_handler.rb
punchblock-2.7.1 spec/support/mock_connection_with_event_handler.rb
punchblock-2.7.0 spec/support/mock_connection_with_event_handler.rb
punchblock-2.6.0 spec/support/mock_connection_with_event_handler.rb
punchblock-2.5.3 spec/support/mock_connection_with_event_handler.rb