Sha256: 927f8658031e2a8df439ebaa2d74c457e55d8b752c3be460c6b3d92494f69a10

Contents?: true

Size: 1.33 KB

Versions: 62

Compression:

Stored size: 1.33 KB

Contents

require 'spec_helper'

describe Picky::Loggers::Silent do
  
  let(:io) { StringIO.new }
  let(:logger) { described_class.new thing }
  context 'with Logger' do
    let(:thing) { Logger.new io }
    describe 'more complicated test case' do
      it 'is correct' do
        logger.info 'Tokenizing '
        logger.tokenize :some_category
        logger.tokenize :some_category
        logger.tokenize :some_category
        logger.info ' Dumping '
        logger.dump :some_category
        logger.dump :some_category
        logger.info ' Loading '
        logger.load :some_category
        logger.load :some_category
        logger.load :some_category
        logger.load :some_category
      
        io.string.should == ''
      end
    end
  end
  context 'with IO' do
    let(:thing) { io }
    describe 'more complicated test case' do
      it 'is correct' do
        logger.info 'Tokenizing '
        logger.tokenize :some_category
        logger.tokenize :some_category
        logger.tokenize :some_category
        logger.info ' Dumping '
        logger.dump :some_category
        logger.dump :some_category
        logger.info ' Loading '
        logger.load :some_category
        logger.load :some_category
        logger.load :some_category
        logger.load :some_category
      
        io.string.should == ''
      end
    end
  end

end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
picky-4.31.3 spec/lib/loggers/silent_spec.rb
picky-4.31.2 spec/lib/loggers/silent_spec.rb
picky-4.31.1 spec/lib/loggers/silent_spec.rb
picky-4.31.0 spec/lib/loggers/silent_spec.rb
picky-4.30.0 spec/lib/loggers/silent_spec.rb
picky-4.29.0 spec/lib/loggers/silent_spec.rb
picky-4.28.1 spec/lib/loggers/silent_spec.rb
picky-4.27.1 spec/lib/loggers/silent_spec.rb
picky-4.27.0 spec/lib/loggers/silent_spec.rb
picky-4.26.2 spec/lib/loggers/silent_spec.rb
picky-4.26.1 spec/lib/loggers/silent_spec.rb
picky-4.26.0 spec/lib/loggers/silent_spec.rb
picky-4.25.3 spec/lib/loggers/silent_spec.rb
picky-4.25.2 spec/lib/loggers/silent_spec.rb
picky-4.25.1 spec/lib/loggers/silent_spec.rb
picky-4.25.0 spec/lib/loggers/silent_spec.rb
picky-4.24.0 spec/lib/loggers/silent_spec.rb
picky-4.23.2 spec/lib/loggers/silent_spec.rb
picky-4.23.1 spec/lib/loggers/silent_spec.rb
picky-4.23.0 spec/lib/loggers/silent_spec.rb