test/lib/docparser/parser_test.rb in docparser-0.2.3 vs test/lib/docparser/parser_test.rb in docparser-0.3.0

- old
+ new

@@ -1,41 +1,21 @@ +# frozen_string_literal: true + require_relative '../../test_helper' describe DocParser::Parser do before do SimpleCov.at_exit {} end after do SimpleCov.at_exit do SimpleCov.result.format! end - Log4r::Logger['docparser'].level = Log4r::INFO end it 'should initialize correctly' do parser = DocParser::Parser.new(quiet: true) parser.must_be_instance_of DocParser::Parser - end - - it 'should define a new logger' do - DocParser::Parser.new(quiet: true) - logger = Log4r::Logger['docparser::parser'] - logger.wont_be_nil - logger.must_be_instance_of Log4r::Logger - end - - it 'should set logger level depending on the quiet setting' do - # rubocop : disable UselessAssignment - parser = DocParser::Parser.new(quiet: true) - logger = Log4r::Logger['docparser'] - old_output = logger.outputters.pop - logger.level.must_equal Log4r::ERROR - parser = DocParser::Parser.new(quiet: false) - logger.level.must_equal Log4r::INFO - parser = DocParser::Parser.new - logger.level.must_equal Log4r::INFO - logger.outputters.push old_output - # rubocop : enable UselessAssignment end it 'should only process the files in range' do files = (0..20).map { |i| "file_#{i}" } parser = DocParser::Parser.new(quiet: true,