Sha256: 10f64264adfc14bc52a1717d1fcbebdbe5e311cdbb230ed1e82d247cc55c9937

Contents?: true

Size: 673 Bytes

Versions: 18

Compression:

Stored size: 673 Bytes

Contents

require "spec_helper"

module Scenic
  describe Configuration do
    after { restore_default_config }

    it "defaults the database adapter to postgres" do
      expect(Scenic.configuration.database).to be_a Adapters::Postgres
      expect(Scenic.database).to be_a Adapters::Postgres
    end

    it "allows the database adapter to be set" do
      adapter = double("Scenic Adapter")

      Scenic.configure do |config|
        config.database = adapter
      end

      expect(Scenic.configuration.database).to eq adapter
      expect(Scenic.database).to eq adapter
    end

    def restore_default_config
      Scenic.configuration = Configuration.new
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
scenic-1.8.0 spec/scenic/configuration_spec.rb
scenic-1.7.0 spec/scenic/configuration_spec.rb
scenic-1.6.0 spec/scenic/configuration_spec.rb
scenic-1.5.5 spec/scenic/configuration_spec.rb
scenic-jets-1.5.5 spec/scenic/configuration_spec.rb
scenic-jets-1.5.4 spec/scenic/configuration_spec.rb
scenic-1.5.4 spec/scenic/configuration_spec.rb
scenic-1.5.3 spec/scenic/configuration_spec.rb
scenic-1.5.2 spec/scenic/configuration_spec.rb
scenic-1.5.1 spec/scenic/configuration_spec.rb
scenic-1.5.0 spec/scenic/configuration_spec.rb
scenic-1.4.1 spec/scenic/configuration_spec.rb
scenic-1.4.0 spec/scenic/configuration_spec.rb
scenic-1.3.0 spec/scenic/configuration_spec.rb
scenic-1.2.0 spec/scenic/configuration_spec.rb
scenic-1.1.1 spec/scenic/configuration_spec.rb
scenic-1.1.0 spec/scenic/configuration_spec.rb
scenic-1.0.0 spec/scenic/configuration_spec.rb