Sha256: c9d9769c45c648c072eb5527dfe6a5fde8dad5b04ec37959de0e28d650ced5c0

Contents?: true

Size: 502 Bytes

Versions: 44

Compression:

Stored size: 502 Bytes

Contents

require "spec_helper"

RSpec.describe Relaton::Config do
  before { restore_to_default_config }
  after { restore_to_default_config }

  describe ".configure" do
    it "allows user to set custom configuration" do
      log_types = ["info", :warning, :error]

      Relaton.configure do |config|
        config.logs = log_types
      end

      expect(Relaton.configuration.logs).to eq(log_types)
    end
  end

  def restore_to_default_config
    Relaton.configuration.logs = %i(info error)
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
relaton-1.16.0 spec/relaton/config_spec.rb
relaton-1.15.6 spec/relaton/config_spec.rb
relaton-1.15.5 spec/relaton/config_spec.rb
relaton-1.15.4 spec/relaton/config_spec.rb
relaton-1.15.3 spec/relaton/config_spec.rb
relaton-1.15.2 spec/relaton/config_spec.rb
relaton-1.15.1 spec/relaton/config_spec.rb
relaton-1.15.0 spec/relaton/config_spec.rb
relaton-1.14.2 spec/relaton/config_spec.rb
relaton-1.14.1 spec/relaton/config_spec.rb
relaton-1.14.0 spec/relaton/config_spec.rb
relaton-1.13.0 spec/relaton/config_spec.rb
relaton-1.12.4 spec/relaton/config_spec.rb
relaton-1.12.3 spec/relaton/config_spec.rb
relaton-1.12.2 spec/relaton/config_spec.rb
relaton-1.12.1 spec/relaton/config_spec.rb
relaton-1.12.0 spec/relaton/config_spec.rb
relaton-1.11.5 spec/relaton/config_spec.rb
relaton-1.11.4 spec/relaton/config_spec.rb
relaton-1.11.3 spec/relaton/config_spec.rb