test/test_CSV-Reports.rb in taskjuggler-3.1.0 vs test/test_CSV-Reports.rb in taskjuggler-3.2.0

- old
+ new

@@ -88,11 +88,12 @@ baseName = File.basename(projectFile, '.tjp') # The reference files must have the same base name as the project file but # they need to be in the ./refs/ directory relative to the project file. refFile = baseDir + "/refs/#{baseName}.csv" - tj = TaskJuggler.new(true) + (mh = TaskJuggler::MessageHandlerInstance.instance).reset + tj = TaskJuggler.new assert(tj.parse([ projectFile ]), "Parser failed for #{projectFile}") assert(tj.schedule, "Scheduler failed for #{projectFile}") if File.file?(refFile) # If there is a reference CSV file for this test case, compare the # output against it. @@ -107,11 +108,10 @@ stdoutToFile(refFile) do assert(tj.generateReports, "Reference file generation failed for #{projectFile}") end end - assert(tj.messageHandler.messages.empty?, - "Unexpected error in #{projectFile}") + assert(mh.messages.empty?, "Unexpected error in #{projectFile}") end def test_CSV_Reports path = File.dirname(__FILE__)