Sha256: 7391fca11ca2ad106266c02a40335a1e7548a14b8e7ed648c566c5731d1864cf

Contents?: true

Size: 856 Bytes

Versions: 5

Compression:

Stored size: 856 Bytes

Contents

require 'spec_helper'
require 'apartment/adapters/sqlite3_adapter'

describe Apartment::Adapters::Sqlite3Adapter, database: :sqlite do
  unless defined?(JRUBY_VERSION)

    subject{ Apartment::Tenant.sqlite3_adapter config }

    context "using connections" do
      def tenant_names
        db_dir = File.expand_path("../../dummy/db", __FILE__)
        Dir.glob("#{db_dir}/*.sqlite3").map { |file| File.basename(file, '.sqlite3') }
      end

      let(:default_tenant) do
        subject.process { File.basename(Apartment::Test.config['connections']['sqlite']['database'], '.sqlite3') }
      end

      it_should_behave_like "a generic apartment adapter"
      it_should_behave_like "a connection based apartment adapter"

      after(:all) do
        File.delete(Apartment::Test.config['connections']['sqlite']['database'])
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
apartment-0.26.1 spec/adapters/sqlite3_adapter_spec.rb
apartment-0.26.0 spec/adapters/sqlite3_adapter_spec.rb
apartment-0.25.2 spec/adapters/sqlite3_adapter_spec.rb
apartment-0.25.1 spec/adapters/sqlite3_adapter_spec.rb
apartment-0.25.0 spec/adapters/sqlite3_adapter_spec.rb