diff --git a/lib/rabbit_carrots/connection.rb b/lib/rabbit_carrots/connection.rb index 7512fd4..8a1b246 100644 --- a/lib/rabbit_carrots/connection.rb +++ b/lib/rabbit_carrots/connection.rb @@ -4,7 +4,7 @@ module RabbitCarrots class Connection include ::Singleton attr_reader :connection - + def initialize @connection = Bunny.new( host: RabbitCarrots.configuration.rabbitmq_host, @@ -16,11 +16,11 @@ module RabbitCarrots @connection.start end - + def channel @channel ||= ConnectionPool.new do connection.create_channel end end - end + end end diff --git a/spec/rabbit_carrots_spec.rb b/spec/rabbit_carrots_spec.rb index 303261f..1b5cd7d 100644 --- a/spec/rabbit_carrots_spec.rb +++ b/spec/rabbit_carrots_spec.rb @@ -4,8 +4,4 @@ RSpec.describe RabbitCarrots do it "has a version number" do expect(RabbitCarrots::VERSION).not_to be nil end - - it "does something useful" do - expect(false).to eq(true) - end end