Sha256: 90607b2687aad804e1d2f188a661f33fc3f3271a46088a168be343d9bde694a1

Contents?: true

Size: 605 Bytes

Versions: 7

Compression:

Stored size: 605 Bytes

Contents

require 'spec_helper'
module Alf
  module Sequel
    describe Connection, "ping" do

      it "returns true on a file" do
        Connection.new("#{sequel_database_path}").ping.should be_true
      end

      it "returns true on an uri" do
        Connection.new(sequel_database_uri).ping.should be_true
      end

      it "returns true on a Path" do
        Connection.new(sequel_database_path).ping.should be_true
      end

      it "raises on non existing" do
        lambda {
          Connection.new("postgres://non-existing.sqlite3").ping
        }.should raise_error
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
alf-sequel-0.16.3 spec/connection/test_ping.rb
alf-sequel-0.16.2 spec/connection/test_ping.rb
alf-sequel-0.16.1 spec/connection/test_ping.rb
alf-sequel-0.16.0 spec/connection/test_ping.rb
alf-sequel-0.15.0 spec/connection/test_ping.rb
alf-sequel-0.14.0 spec/connection/test_ping.rb
alf-sequel-0.13.0 spec/connection/test_ping.rb