spec/octoshark/connection_manager_spec.rb in octoshark-0.1.1 vs spec/octoshark/connection_manager_spec.rb in octoshark-0.1.2
- old
+ new
@@ -23,9 +23,17 @@
expect { manager.connection_pools[:db1].connection }.not_to raise_error
end
end
+ describe "#identifier" do
+ it "has unique identifiers" do
+ manager1 = Octoshark::ConnectionManager.new
+ manager2 = Octoshark::ConnectionManager.new
+ expect(manager1.identifier).to_not eq(manager2.identifier)
+ end
+ end
+
describe "#current_connection" do
it "returns last used connection as current one" do
manager = Octoshark::ConnectionManager.new(configs)
manager.with_connection(:db1) do |connection|
expect(manager.current_connection).to eq(connection)