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.22.0 spec/lib/loggers/silent_spec.rb
picky-4.21.2 spec/lib/loggers/silent_spec.rb
picky-4.21.1 spec/lib/loggers/silent_spec.rb
picky-4.21.0 spec/lib/loggers/silent_spec.rb
picky-4.20.2 spec/lib/loggers/silent_spec.rb
picky-4.20.1 spec/lib/loggers/silent_spec.rb
picky-4.20.0 spec/lib/loggers/silent_spec.rb
picky-4.19.7 spec/lib/loggers/silent_spec.rb
picky-4.19.6 spec/lib/loggers/silent_spec.rb
picky-4.19.5 spec/lib/loggers/silent_spec.rb
picky-4.19.4 spec/lib/loggers/silent_spec.rb
picky-4.19.3 spec/lib/loggers/silent_spec.rb
picky-4.19.2 spec/lib/loggers/silent_spec.rb
picky-4.19.1 spec/lib/loggers/silent_spec.rb
picky-4.19.0 spec/lib/loggers/silent_spec.rb
picky-4.18.0 spec/lib/loggers/silent_spec.rb
picky-4.17.1 spec/lib/loggers/silent_spec.rb
picky-4.17.0 spec/lib/loggers/silent_spec.rb
picky-4.16.0 spec/lib/loggers/silent_spec.rb
picky-4.15.1 spec/lib/loggers/silent_spec.rb