spec/unit/bunny_mock/exchange_spec.rb in bunny-mock-1.1.0 vs spec/unit/bunny_mock/exchange_spec.rb in bunny-mock-1.2.0

- old
+ new

@@ -38,24 +38,24 @@ it 'should bind by exchange instance' do @receiver.bind @source expect(@receiver.bound_to?(@source)).to be_truthy - expect(@source.has_binding?(@receiver)).to be_truthy + expect(@source.routes_to?(@receiver)).to be_truthy end it 'should bind by exchange name' do @receiver.bind @source.name expect(@receiver.bound_to?(@source)).to be_truthy - expect(@source.has_binding?(@receiver)).to be_truthy + expect(@source.routes_to?(@receiver)).to be_truthy end it 'should raise error when exchange does not exists' do - expect { @receiver.bind('this.xchg.does.not.exist') }.to raise_exception(BunnyMock::NotFound) + expect { @receiver.bind('this.xchg.does.not.exist') }.to raise_exception(Bunny::NotFound) end end context '#unbind' do @@ -69,24 +69,24 @@ it 'should unbind by exchange instance' do @receiver.unbind @source expect(@receiver.bound_to?(@source)).to be_falsey - expect(@source.has_binding?(@receiver)).to be_falsey + expect(@source.routes_to?(@receiver)).to be_falsey end it 'should unbind by exchange name' do @receiver.unbind @source.name expect(@receiver.bound_to?(@source)).to be_falsey - expect(@source.has_binding?(@receiver)).to be_falsey + expect(@source.routes_to?(@receiver)).to be_falsey end it 'should raise error when exchange does not exists' do - expect { @receiver.unbind('this.xchg.does.not.exist') }.to raise_exception(BunnyMock::NotFound) + expect { @receiver.unbind('this.xchg.does.not.exist') }.to raise_exception(Bunny::NotFound) end end context '#bound_to?' do @@ -125,15 +125,15 @@ expect(@receiver.bound_to?(@source)).to be_falsey end it 'should raise error when exchange does not exists' do - expect { @receiver.bound_to?('this.xchg.does.not.exist') }.to raise_exception(BunnyMock::NotFound) + expect { @receiver.bound_to?('this.xchg.does.not.exist') }.to raise_exception(Bunny::NotFound) end end - context '#has_binding?' do + context '#routes_to?' do before do @source = @channel.exchange 'xchg.source' @receiver = @channel.exchange 'xchg.receiver' @@ -143,18 +143,18 @@ it 'should unbind by exchange instance' do @receiver.unbind @source expect(@receiver.bound_to?(@source)).to be_falsey - expect(@source.has_binding?(@receiver)).to be_falsey + expect(@source.routes_to?(@receiver)).to be_falsey end it 'should unbind by exchange name' do @receiver.unbind @source.name expect(@receiver.bound_to?(@source)).to be_falsey - expect(@source.has_binding?(@receiver)).to be_falsey + expect(@source.routes_to?(@receiver)).to be_falsey end end context '#delete' do