Sha256: d8e7e6a7ae921558e1b815aef81a09505b87e19f39446d6966202707b234e573
Contents?: true
Size: 1.06 KB
Versions: 2
Compression:
Stored size: 1.06 KB
Contents
$:.unshift File.expand_path('../../..', __FILE__) require "tempfile" require "spec/fixtures/constants" require "spec/support/matchers/colors" require "lib/xcpretty/ansi" include XCPretty::ANSI 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\)} FAILING_TEST_NAME_MATCHER = %r{\w+, expected:} def run_xcpretty flags add_run_input SAMPLE_OCUNIT_SUITE_COMPLETION add_run_input SAMPLE_EXECUTED_TESTS input_file = Tempfile.new("xcpretty_input") File.open(input_file.path, 'w') do |file| file.print run_input end @output = %x(cat '#{input_file.path}' | bin/xcpretty #{flags}) input_file.unlink end def add_run_input text run_input << "\n#{text}" end def run_input @input ||= "" end def run_output @output ||= "" end Before do self.colorize = true end After do @input = "" @output = "" end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
xcpretty-0.0.5 | features/support/env.rb |
xcpretty-0.0.4 | features/support/env.rb |