Sha256: 56045303ce9c5181d34468d874a62b405c2cd23fbe5ceaa4d2add3d6049f48bf

Contents?: true

Size: 944 Bytes

Versions: 8

Compression:

Stored size: 944 Bytes

Contents

require 'torquebox/logger'
require 'logger'

describe TorqueBox::Logger do

  it "should look nice for class objects" do
    require 'torquebox/service_registry'
    logger = TorqueBox::Logger.new( TorqueBox::ServiceRegistry )
    logger.error("JC: log for cache store")
  end

  it "should support the various boolean methods" do
    logger = TorqueBox::Logger.new
   
    logger.trace?.should be_false
    logger.debug?.should be_false
    logger.info?.should be_false
    logger.warn?.should be_true
    logger.error?.should be_true
    logger.fatal?.should be_true
  end

  it "should not barf on meaningless level setting" do
    logger = TorqueBox::Logger.new
    logger.level = Logger::WARN
    logger.level.should == Logger::WARN
  end

  it "should deal with blocks correctly" do 
    logger = TorqueBox::Logger.new
    logger.error "JC: message zero"
    logger.error { "JC: message" }
    logger.error "JC: message too"
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
torquebox-core-2.0.3-java spec/logger_spec.rb
torquebox-core-2.0.2-java spec/logger_spec.rb
torquebox-core-2.0.1-java spec/logger_spec.rb
torquebox-core-2.0.0-java spec/logger_spec.rb
torquebox-core-2.0.0.cr1-java spec/logger_spec.rb
torquebox-core-2.0.0.beta3-java spec/logger_spec.rb
torquebox-core-2.0.0.beta2-java spec/logger_spec.rb
torquebox-core-2.0.0.beta1-java spec/logger_spec.rb