Sha256: 9fb5e3a5e870b775cb8f5ff84955b0e5c63bf851481c5f4390c1ef395f8b6b12

Contents?: true

Size: 593 Bytes

Versions: 6

Compression:

Stored size: 593 Bytes

Contents

require 'spec_helper'

describe YogiBerra::Logger do

  it "should call $stderr to log" do
    $stderr.should_receive(:puts).with("[YogiBerra Info] The future ain't what it used to be.")
    YogiBerra::Logger.log("The future ain't what it used to be.")
  end

  it "should call Rails::Logger" do
    load "#{SPEC_FOLDER}/fixtures/rails.rb"
    logger = double('logger')
    Rails.stub(:logger) { logger }
    logger.should_receive(:info).with("[YogiBerra Info] Half the lies they tell about me aren't true.")
    YogiBerra::Logger.log("Half the lies they tell about me aren't true.")
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
yogi_berra-0.0.10 spec/yogi_berra_logger_spec.rb
yogi_berra-0.0.9 spec/yogi_berra_logger_spec.rb
yogi_berra-0.0.8 spec/yogi_berra_logger_spec.rb
yogi_berra-0.0.6 spec/yogi_berra_logger_spec.rb
yogi_berra-0.0.5 spec/yogi_berra_logger_spec.rb
yogi_berra-0.0.4 spec/yogi_berra_logger_spec.rb