Sha256: f9d442334ad1e616b9fb5ac73facbceca98065eb8ad10da0613f16932233c9e8

Contents?: true

Size: 459 Bytes

Versions: 4

Compression:

Stored size: 459 Bytes

Contents

require 'spec_helper'

describe Fourchette::Logger do
  class FakeClassToTest
    include Fourchette::Logger
  end

  subject { FakeClassToTest.new }

  it { expect(subject.logger.level).to be Logger::INFO }

  context 'first time called' do
    it { expect(subject.logger).to be_a(Logger) }
  end

  context 'each time after' do
    it 'returns the cached version' do
      logger = subject.logger
      expect(subject.logger).to be(logger)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fourchette-0.1.2 spec/lib/fourchette/logger_spec.rb
fourchette-0.1.1 spec/lib/fourchette/logger_spec.rb
fourchette-0.1.0 spec/lib/fourchette/logger_spec.rb
fourchette-0.0.8 spec/lib/fourchette/logger_spec.rb