Sha256: c6ae6cd54dc951f47990d372443e94935dbcfb0827c624050b4fcf9f718b1ebb
Contents?: true
Size: 898 Bytes
Versions: 2
Compression:
Stored size: 898 Bytes
Contents
require 'spec_helper' describe Alephant::Logger do describe ".create" do specify do expect(subject.create).to be_a Alephant::Logger::Logger end end end describe Alephant::Logger::Logger do describe "#info" do context "no logger drivers given" do subject { Alephant::Logger::Logger.new [] } specify do expect_any_instance_of(::Logger).to receive(:info).with "msg" subject.info "msg" end end context "logger drivers given" do subject { Alephant::Logger::Logger.new [driver] } let(:driver) { double } it "responding drivers receive method calls" do expect(driver).to receive(:metric).with("foo") subject.metric("foo") end it "::Logger is always used" do expect_any_instance_of(::Logger).to receive(:info).with "foo" subject.info "foo" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
alephant-logger-1.1.0 | spec/logger_spec.rb |
alephant-logger-1.0.1 | spec/logger_spec.rb |