spec/exchange_spec.rb in celldee-bunny-0.2.0 vs spec/exchange_spec.rb in celldee-bunny-0.3.0
- old
+ new
@@ -9,16 +9,16 @@
require File.expand_path(File.join(File.dirname(__FILE__), %w[.. lib bunny]))
describe Bunny::Exchange do
before(:each) do
- @b = Bunny.new
+ @b = Bunny::Client.new
@b.start
end
it "should raise an error if instantiated as non-existent type" do
- lambda { @b.exchange('bogus_ex', :type => :bogus) }.should raise_error(API::ProtocolError)
+ lambda { @b.exchange('bogus_ex', :type => :bogus) }.should raise_error(Bunny::ProtocolError)
end
it "should allow a default direct exchange to be instantiated by specifying :type" do
exch = @b.exchange('amq.direct', :type => :direct)
exch.should be_an_instance_of Bunny::Exchange
@@ -103,10 +103,10 @@
end
it "should be able to be deleted" do
exch = @b.exchange('direct_exchange')
res = exch.delete
- res.should == 'EXCHANGE DELETED'
+ res.should == :delete_ok
@b.exchanges.has_key?('direct_exchange').should be false
end
it "should ignore the :nowait option when deleted" do
exch = @b.exchange('direct2_exchange')
\ No newline at end of file