Sha256: 037a1ab37a20f6a8c4c24f6687d1385698f48386319399d99d2f3275340557ba

Contents?: true

Size: 823 Bytes

Versions: 26

Compression:

Stored size: 823 Bytes

Contents

describe Bisu::Logger do
  let(:summary) { Bisu::Logger.summary }
  let(:info)    { summary[:info] }
  let(:warn)    { summary[:warn] }
  let(:error)   { summary[:error] }

  context "when logging to info" do
    before { Bisu::Logger.info "msg" }

    it "returns the expected totals" do
      expect(info).to  eq 1
      expect(warn).to  eq 0
      expect(error).to eq 0
    end
  end

  context "when logging to warn" do
    before { Bisu::Logger.warn "msg" }

    it "returns the expected totals" do
      expect(info).to  eq 0
      expect(warn).to  eq 1
      expect(error).to eq 0
    end
  end

  context "when logging to error" do
    before { Bisu::Logger.error "msg" }

    it "returns the expected totals" do
      expect(info).to  eq 0
      expect(warn).to  eq 0
      expect(error).to eq 1
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
bisu-2.3.0 spec/lib/bisu/logger_spec.rb
bisu-2.2.0 spec/lib/bisu/logger_spec.rb
bisu-2.1.0 spec/lib/bisu/logger_spec.rb
bisu-2.0.0 spec/lib/bisu/logger_spec.rb
bisu-1.10.2 spec/lib/bisu/logger_spec.rb
bisu-1.10.1 spec/lib/bisu/logger_spec.rb
bisu-1.10.0 spec/lib/bisu/logger_spec.rb
bisu-1.9.0 spec/lib/bisu/logger_spec.rb
bisu-1.8.0 spec/lib/bisu/logger_spec.rb
bisu-1.7.3 spec/lib/bisu/logger_spec.rb
bisu-1.7.2 spec/lib/bisu/logger_spec.rb
bisu-1.7.1 spec/lib/bisu/logger_spec.rb
bisu-1.7.0 spec/lib/bisu/logger_spec.rb
bisu-1.6.0 spec/lib/bisu/logger_spec.rb
bisu-1.5.0 spec/lib/bisu/logger_spec.rb
bisu-1.4.7 spec/lib/bisu/logger_spec.rb
bisu-1.4.6 spec/lib/bisu/logger_spec.rb
bisu-1.4.5 spec/lib/bisu/logger_spec.rb
bisu-1.4.4 spec/lib/bisu/logger_spec.rb
bisu-1.4.3 spec/lib/bisu/logger_spec.rb