Sha256: b33c39d84705cf625ca962e8fc033e1de22b51dbbc41b35dc5848cde956be67c

Contents?: true

Size: 460 Bytes

Versions: 2

Compression:

Stored size: 460 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

2 entries across 2 versions & 1 rubygems

Version Path
fourchette-0.1.4 spec/lib/fourchette/logger_spec.rb
fourchette-0.1.3 spec/lib/fourchette/logger_spec.rb