Sha256: 0da9764436c7a6d993c794eab9186c81b8353bd6c1ff2ffec018311d6ce33c54

Contents?: true

Size: 1.19 KB

Versions: 27

Compression:

Stored size: 1.19 KB

Contents

require 'spec_helper'

describe SequelRails::Storage::Jdbc do
  let(:adapter)             { 'jdbc:mysql' }
  let(:auto_reconnect)      { true }
  let(:connection_handling) { 'queue' }
  let(:database)            { 'test' }
  let(:host)                { 'localhost' }
  let(:password)            { nil }
  let(:pool)                { 80 }
  let(:user)                { 'root' }
  let(:timeout)             { 5000 }
  let(:config) do
    {
      'password' => password,
      'pool' => pool,
      'autoReconnect' => auto_reconnect,
      'adapter' => adapter,
      'timeout' => timeout,
      'connection_handling' => connection_handling,
      'user' => user,
      'host' => host,
      'database' => database,
      'url' => "#{adapter}://#{host}/#{database}?password=#{password}&pool=#{pool}&autoReconnect=#{auto_reconnect}&timeout=#{timeout}&connection_handling=#{connection_handling}&user=#{user}"
    }
  end
  let(:store) { described_class.new(config) }

  describe '#_root_url' do
    subject { store._root_url }
    let(:expected) { "jdbc:mysql://#{host}" }

    it { should == expected }

    context 'with ip addresses' do
      let(:host) { '127.0.0.1' }

      it { should == expected }
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
sequel-rails-1.2.3 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-1.2.2 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-1.2.1 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-1.2.0 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-1.1.1 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-1.1.0 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-1.0.1 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-1.0.0 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-0.9.17 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-0.9.16 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-0.9.15 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-0.9.14 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-0.9.13 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-0.9.12 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-0.9.11 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-0.9.10 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-0.9.9 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-0.9.8 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-0.9.7 spec/lib/sequel_rails/jdbc_spec.rb
sequel-rails-0.9.6 spec/lib/sequel_rails/jdbc_spec.rb