Sha256: 29afb5ebf58e0513e5ca667161510d2becd0c53c12245a4fa494ddbfb471cdb8

Contents?: true

Size: 548 Bytes

Versions: 1

Compression:

Stored size: 548 Bytes

Contents

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

class MyClass; loggable; end

describe "MyClass, with loggable mix-in" do
  
  before(:each) do
    @logger = mock()
  end
  
  it "should have nothing as a logger by default" do
    MyClass.logger.should.be nil
  end
  
  it "should allow the asssignment of a logger" do
    MyClass.logger = @logger
    MyClass.logger.should.equal @logger
  end
  
  it "should allow access to the logger from an instance" do
    MyClass.logger = @logger
    MyClass.new.logger.should.equal @logger
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
loggable-0.0.1 test/examples/loggable_test.rb