Sha256: 6ea1e9c52a4c919f0d5e11438d09a5043e073fe8146bdcdfa4e495f811b2a9a1

Contents?: true

Size: 612 Bytes

Versions: 13

Compression:

Stored size: 612 Bytes

Contents

require 'spec_helper'

describe YogiBerra::Logger do

  it "should call $stderr to log" do
    reset_if_rails
    $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

13 entries across 13 versions & 1 rubygems

Version Path
yogi_berra-0.2.1 spec/yogi_berra_logger_spec.rb
yogi_berra-0.2.0 spec/yogi_berra_logger_spec.rb
yogi_berra-0.1.7 spec/yogi_berra_logger_spec.rb
yogi_berra-0.1.6 spec/yogi_berra_logger_spec.rb
yogi_berra-0.1.4 spec/yogi_berra_logger_spec.rb
yogi_berra-0.1.3 spec/yogi_berra_logger_spec.rb
yogi_berra-0.1.1 spec/yogi_berra_logger_spec.rb
yogi_berra-0.1.0 spec/yogi_berra_logger_spec.rb
yogi_berra-0.0.15 spec/yogi_berra_logger_spec.rb
yogi_berra-0.0.14 spec/yogi_berra_logger_spec.rb
yogi_berra-0.0.13 spec/yogi_berra_logger_spec.rb
yogi_berra-0.0.12 spec/yogi_berra_logger_spec.rb
yogi_berra-0.0.11 spec/yogi_berra_logger_spec.rb