test/lib/docparser/parser_test.rb in docparser-0.1.4 vs test/lib/docparser/parser_test.rb in docparser-0.1.6

- old
+ new

@@ -22,19 +22,21 @@ 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, @@ -68,11 +70,11 @@ file.close parser = DocParser::Parser.new(quiet: true, encoding: 'iso-8859-1', files: [file.path], parallel: false) parser.parse! do - $encoding = self.encoding + $encoding = encoding end $encoding.must_equal 'iso-8859-1' end it 'should give an Exception if output is not supported' do @@ -190,6 +192,6 @@ end # :nocov: # $method_id.must_equal :fork mock_output.verify.must_equal true end -end \ No newline at end of file +end