features/support/env.rb in xcpretty-0.1.12 vs features/support/env.rb in xcpretty-0.2.0
- old
+ new
@@ -1,6 +1,6 @@
-$:.unshift File.expand_path('../../..', __FILE__)
+$LOAD_PATH.unshift File.expand_path('../../..', __FILE__)
require 'tempfile'
require 'spec/fixtures/constants'
require 'spec/support/matchers/colors'
require 'lib/xcpretty/ansi'
@@ -18,11 +18,11 @@
require 'vendor/json_pure/parser'
end
include XCPretty::ANSI
-TEST_RUN_START_MATCHER = /Test Suite .+ started/
+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\]}
@@ -51,11 +51,11 @@
def run_output
@output ||= ''
end
def html_report
- @html_report ||= REXML::Document.new(File.open(XCPretty::HTML::FILEPATH, 'r').read.sub("<!DOCTYPE html>",""))
+ @html_report ||= REXML::Document.new(File.open(XCPretty::HTML::FILEPATH, 'r').read.sub("<!DOCTYPE html>", ""))
end
def html_report_body
html_report.root.get_elements('//body').first
end
@@ -112,5 +112,6 @@
FileUtils.rm_rf(XCPretty::JUnit::FILEPATH)
FileUtils.rm_rf(XCPretty::HTML::FILEPATH)
FileUtils.rm_rf(XCPretty::JSONCompilationDatabase::FILE_PATH)
File.delete(@screenshot_file_path) if @screenshot_file_path
end
+