Sha256: 5dc4abeb19ed95f016f5eb1f043bd677006ef71fa93f46f4c2a79074f3a7be6b

Contents?: true

Size: 585 Bytes

Versions: 8

Compression:

Stored size: 585 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe Cachetastic::Logger do
  
  before(:each) do
    Time.stub!(:now).and_return(Time.at(0))
    @logger = mock(Logger.new(STDOUT))    
  end
  
  [:fatal, :error, :warn, :info, :debug].each do |meth|
    
    describe meth do
      
      it "should call the underlying #{meth} method" do
        @logger.should_receive(meth).with("[CACHE] [#{meth.to_s.upcase}]\t12/31/69 19:00:00\tHi!")
        
        c_logger = Cachetastic::Logger.new(@logger)
        c_logger.send(meth, 'Hi!')
      end
      
    end
    
  end
  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cachetastic-3.7.0 spec/cachetastic/logger_spec.rb
cachetastic-3.6.0 spec/cachetastic/logger_spec.rb
cachetastic-3.5.3 spec/cachetastic/logger_spec.rb
cachetastic-3.5.2 spec/cachetastic/logger_spec.rb
cachetastic-3.5.1 spec/cachetastic/logger_spec.rb
cachetastic-3.5.0 spec/cachetastic/logger_spec.rb
cachetastic-3.2.0 spec/cachetastic/logger_spec.rb
cachetastic-3.1.0 spec/cachetastic/logger_spec.rb