Sha256: 0c2806e11b0879b8dc6bfcdd000ea229145252fddcae06eda4968ff007fc53fb

Contents?: true

Size: 510 Bytes

Versions: 4

Compression:

Stored size: 510 Bytes

Contents

require 'spec_helper'
module Alf
  class Database
    describe Connection, "close" do

      let(:connection_handler){ ->(opts){ self } }

      let(:conn){ Connection.new(self, &connection_handler) }

      subject{ conn.close }

      def close
        @seen = true
      end

      it 'should close the physical connection' do
        subject
        @seen.should be_true
      end

      it 'should close the connection itself' do
        subject
        conn.should be_closed
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-database/connection/test_close.rb
alf-core-0.14.0 spec/unit/alf-database/connection/test_close.rb
alf-core-0.13.1 spec/unit/alf-database/connection/test_close.rb
alf-core-0.13.0 spec/unit/alf-database/connection/test_close.rb