features/support/env.rb in xcpretty-0.0.9 vs features/support/env.rb in xcpretty-0.1.0

- old
+ new

@@ -15,10 +15,11 @@ TEST_RUN_START_MATCHER = /Test Suite .+ started/ TEST_SUITE_COMPLETION_MATCHER = /Executed \d+ tests, with \d+ failures \(\d+ unexpected\) in \d+\.\d+ \(\d+\.\d+\) seconds/ TEST_SUITE_START_MATCHER = /[\w]*(Spec|Tests)$/ TEST_PATH_MATCHER = %r{[\w/\-\s]+:\d+} PASSING_TEST_NAME_MATCHER = %r{\w+\s\(\d+\.\d+\sseconds\)} +PENDING_TEST_NAME_MATCHER = %r{\w+\s\[PENDING\]} FAILING_TEST_NAME_MATCHER = %r{\w+, expected:} def run_xcpretty(flags) input_file = Tempfile.new('xcpretty_input') File.open(input_file.path, 'w') do |file| @@ -46,14 +47,30 @@ def junit_report_root junit_report.root.elements.to_a.first end +def custom_report_path + @custom_report_path ||= begin + @custom_report_file1 = Tempfile.new('custom_report_path') + @custom_report_file1.path + end +end + +def other_custom_report_path + @custom_report_path2 ||= begin + @custom_report_file2 = Tempfile.new('custom_report_path') + @custom_report_file2.path + end +end + Before do self.colorize = true end After do @input = "" @output = "" + @custom_report_file1.unlink if @custom_report_file1 + @custom_report_file2.unlink if @custom_report_file2 FileUtils.rm_rf(XCPretty::JUnit::FILEPATH) end