Sha256: db907acb5fb87fdcec321895a857f4c24f2acdbcfcf7365d7fdf2b11a769ea3f

Contents?: true

Size: 1.09 KB

Versions: 34

Compression:

Stored size: 1.09 KB

Contents

require "singleton"
require "spec_helper"

describe Timber::Config, :rails_23 => true do
  let(:config) { Timber::Config.send(:new) }

  describe ".logrageify!" do
    it "should logrageify" do
      expect(Timber::Integrations::ActionController.silence?).to eq(false)
      expect(Timber::Integrations::ActionView.silence?).to eq(false)
      expect(Timber::Integrations::ActiveRecord.silence?).to eq(false)
      expect(Timber::Integrations::Rack::HTTPEvents.collapse_into_single_event?).to eq(false)

      config.logrageify!

      expect(Timber::Integrations::ActionController.silence?).to eq(true)
      expect(Timber::Integrations::ActionView.silence?).to eq(true)
      expect(Timber::Integrations::ActiveRecord.silence?).to eq(true)
      expect(Timber::Integrations::Rack::HTTPEvents.collapse_into_single_event?).to eq(true)

      # Reset
      Timber::Integrations::ActionController.silence = false
      Timber::Integrations::ActionView.silence = false
      Timber::Integrations::ActiveRecord.silence = false
      Timber::Integrations::Rack::HTTPEvents.collapse_into_single_event = false
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
timber-2.1.7 spec/timber/config_spec.rb
timber-2.1.6 spec/timber/config_spec.rb
timber-2.1.5 spec/timber/config_spec.rb
timber-2.1.4 spec/timber/config_spec.rb
timber-2.1.3 spec/timber/config_spec.rb
timber-2.1.2 spec/timber/config_spec.rb
timber-2.1.1 spec/timber/config_spec.rb
timber-2.1.0 spec/timber/config_spec.rb
timber-2.1.0.rc6 spec/timber/config_spec.rb
timber-2.1.0.rc5 spec/timber/config_spec.rb
timber-2.1.0.rc4 spec/timber/config_spec.rb
timber-2.1.0.rc3 spec/timber/config_spec.rb
timber-2.1.0.rc2 spec/timber/config_spec.rb
timber-2.1.0.rc1 spec/timber/config_spec.rb