Sha256: 88c5b323c5cf8c5c3f9a41daa839822a287688765e749ffb0535bdc9d693b034

Contents?: true

Size: 584 Bytes

Versions: 14

Compression:

Stored size: 584 Bytes

Contents

describe Hem::Logging do
  before do
    Hem.logger = nil
  end

  describe "module logger" do
    it "should return global logger instance" do
      Hem.logger = "TEST"
      class LoggerTest
        include Hem::Logging
      end

      LoggerTest.new.logger.should match "TEST"
    end
  end

  describe "global logger" do
    it "should initialize to STDOUT logger" do
      Hem::Logging.logger.instance_variable_get('@logdev').dev.should be STDOUT
    end

    it "should initialize to WARN log level" do
      Hem::Logging.logger.level.should eq Logger::WARN
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
hem-1.2.4 spec/hem/logging_spec.rb
hem-1.2.3 spec/hem/logging_spec.rb
hem-1.2.2 spec/hem/logging_spec.rb
hem-1.2.1 spec/hem/logging_spec.rb
hem-1.2.0 spec/hem/logging_spec.rb
hem-1.1.2 spec/hem/logging_spec.rb
hem-1.1.1 spec/hem/logging_spec.rb
hem-1.1.0 spec/hem/logging_spec.rb
hem-1.0.1.beta6 spec/hem/logging_spec.rb
hem-1.0.1.beta5 spec/hem/logging_spec.rb
hem-1.0.1.beta4 spec/hem/logging_spec.rb
hem-1.0.1.beta3 spec/hem/logging_spec.rb
hem-1.0.1.beta2 spec/hem/logging_spec.rb
hem-1.0.1.beta1 spec/hem/logging_spec.rb