Sha256: e63c852005646554348947d60538b17b84ffc3cbf9d73e2006d767a5ab3a3b8b

Contents?: true

Size: 877 Bytes

Versions: 10

Compression:

Stored size: 877 Bytes

Contents

require File.join(File.dirname(__FILE__), 'spec_helper.rb')

describe Sequel::Database do
  specify "should provide disconnect functionality" do
    INTEGRATION_DB.test_connection
    INTEGRATION_DB.pool.size.should == 1
    INTEGRATION_DB.disconnect
    INTEGRATION_DB.pool.size.should == 0
  end

  specify "should raise Sequel::DatabaseError on invalid SQL" do
    proc{INTEGRATION_DB << "SELECT"}.should raise_error(Sequel::DatabaseError)
  end

  specify "should store underlying wrapped exception in Sequel::DatabaseError" do
    begin
      INTEGRATION_DB << "SELECT"
    rescue Sequel::DatabaseError=>e
      e.wrapped_exception.should be_a_kind_of(Exception)
    end
  end

  specify "should not have the connection pool swallow non-StandardError based exceptions" do
    proc{INTEGRATION_DB.pool.hold{raise Interrupt, "test"}}.should raise_error(Interrupt)
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
sequel-3.12.1 spec/integration/database_test.rb
sequel-3.12.0 spec/integration/database_test.rb
sequel-3.11.0 spec/integration/database_test.rb
viking-sequel-3.10.0 spec/integration/database_test.rb
sequel-3.10.0 spec/integration/database_test.rb
sequel-3.9.0 spec/integration/database_test.rb
sequel-3.8.0 spec/integration/database_test.rb
sequel-3.7.0 spec/integration/database_test.rb
sequel-3.6.0 spec/integration/database_test.rb
sequel-3.5.0 spec/integration/database_test.rb