Sha256: 94e3c1c8fd0c5fb81bf7cf4f71878754ce30d9318a4bdfe01a0b3871c3d68fd3

Contents?: true

Size: 675 Bytes

Versions: 3

Compression:

Stored size: 675 Bytes

Contents

require_relative '../../../test_helper'

describe DocParser::NilOutput do
  before do
    Log4r::Logger['docparser'].level = Log4r::ERROR
  end
  after do
    Log4r::Logger['docparser'].level = Log4r::INFO
  end

  it 'should not create a file' do
    Dir.mktmpdir do |dir|
      filename = File.join(dir, '*')
      DocParser::NilOutput.new
      Dir[filename].must_be_empty
    end
  end

  it 'must give the correct rowcount' do
    output = DocParser::NilOutput.new
    output.header = 'test', 'the', 'header'
    output.rowcount.must_equal 0
    output.add_row ['aap', 'noot', 'mies']
    output.add_row ['aap', 'noot', 'mies']
    output.rowcount.must_equal 0
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
docparser-0.1.2 test/lib/docparser/output/nil_output_test.rb
docparser-0.1.1 test/lib/docparser/output/nil_output_test.rb
docparser-0.1.0 test/lib/docparser/output/nil_output_test.rb