Sha256: 383d412bff7e8ced0eebe67145bb2988f07aa5293b0b2392cde684628922bfc3

Contents?: true

Size: 1.52 KB

Versions: 35

Compression:

Stored size: 1.52 KB

Contents

require 'spec_helper'

describe Picky::Loggers::Verbose do
  
  let(:io) { StringIO.new }
  let(:logger) { described_class.new io }

  describe 'more complicated test case' do
    it 'is correct' do
      index    = Picky::Index.new :some_index
      category = Picky::Category.new :some_category, index
      file = stub :file, :path => 'some/path'
      
      Time.stub! :now => Time.new('zeros')
      
      logger.info 'Tokenizing '
      logger.tokenize category, file
      logger.tokenize category, file
      logger.tokenize category, file
      logger.info ' Dumping '
      logger.dump category
      logger.dump category
      logger.info ' Loading '
      logger.load category
      logger.load category
      logger.load category
      logger.load category
      
      io.string.should == "00:00:00: Tokenizing \n00:00:00:   \"some_index:some_category\": Tokenized -> some/path.\n00:00:00:   \"some_index:some_category\": Tokenized -> some/path.\n00:00:00:   \"some_index:some_category\": Tokenized -> some/path.\n00:00:00:  Dumping \n00:00:00:   \"some_index:some_category\": Dumped -> index/test/some_index/some_category_*.\n00:00:00:   \"some_index:some_category\": Dumped -> index/test/some_index/some_category_*.\n00:00:00:  Loading \n00:00:00:   \"some_index:some_category\": Loading index from cache.\n00:00:00:   \"some_index:some_category\": Loading index from cache.\n00:00:00:   \"some_index:some_category\": Loading index from cache.\n00:00:00:   \"some_index:some_category\": Loading index from cache.\n"
    end
  end

end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
picky-4.9.0 spec/lib/loggers/verbose_spec.rb
picky-4.8.1 spec/lib/loggers/verbose_spec.rb
picky-4.8.0 spec/lib/loggers/verbose_spec.rb
picky-4.7.0 spec/lib/loggers/verbose_spec.rb
picky-4.6.6 spec/lib/loggers/verbose_spec.rb
picky-4.6.5 spec/lib/loggers/verbose_spec.rb
picky-4.6.4 spec/lib/loggers/verbose_spec.rb
picky-4.6.3 spec/lib/loggers/verbose_spec.rb
picky-4.6.2 spec/lib/loggers/verbose_spec.rb
picky-4.6.1 spec/lib/loggers/verbose_spec.rb
picky-4.6.0 spec/lib/loggers/verbose_spec.rb
picky-4.5.12 spec/lib/loggers/verbose_spec.rb
picky-4.5.11 spec/lib/loggers/verbose_spec.rb
picky-4.5.10 spec/lib/loggers/verbose_spec.rb
picky-4.5.9 spec/lib/loggers/verbose_spec.rb
picky-4.5.8 spec/lib/loggers/verbose_spec.rb
picky-4.5.7 spec/lib/loggers/verbose_spec.rb
picky-4.5.6 spec/lib/loggers/verbose_spec.rb
picky-4.5.5 spec/lib/loggers/verbose_spec.rb
picky-4.5.4 spec/lib/loggers/verbose_spec.rb