module Lapine::Test::RSpecHelper

Public Class Methods

setup(_example = nil) click to toggle source
# File lib/lapine/test/rspec_helper.rb, line 6
def self.setup(_example = nil)
  RSpec::Mocks::AllowanceTarget.new(Lapine::Exchange).to(
    RSpec::Mocks::Matchers::Receive.new(:new, ->(name, properties) {
      Lapine::Test::Exchange.new(name, properties)
    })
  )
end
teardown() click to toggle source
# File lib/lapine/test/rspec_helper.rb, line 14
def self.teardown
  Lapine.close_connections!
end