Sha256: 2ae986f4fb9b2ffa58d5b4f1fc555bf1a7d1f568a334e569995ebd24799251d3

Contents?: true

Size: 483 Bytes

Versions: 8

Compression:

Stored size: 483 Bytes

Contents

require_relative 'database_configuration'

module Tests
  class Database
    NAME = 'shoulda-matchers-test'
    ADAPTER_NAME = ENV.fetch('DATABASE_ADAPTER', 'sqlite3').to_sym

    include Singleton

    attr_reader :config

    def initialize
      @config = Tests::DatabaseConfiguration.for(NAME, ADAPTER_NAME)
    end

    def name
      config.database
    end

    def adapter_name
      config.adapter
    end

    def adapter_class
      config.adapter_class
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
shoulda-matchers-3.1.3 spec/support/tests/database.rb
shoulda-matchers-4.0.0.rc1 spec/support/tests/database.rb
shoulda-matchers-3.1.2 spec/support/tests/database.rb
shoulda-matchers-3.1.1 spec/support/tests/database.rb
shoulda-matchers-3.1.0 spec/support/tests/database.rb
shoulda-matchers-3.0.1 spec/support/tests/database.rb
shoulda-matchers-3.0.0 spec/support/tests/database.rb
shoulda-matchers-3.0.0.rc1 spec/support/tests/database.rb