lib/scan/test_command_generator.rb in scan-0.2.1 vs lib/scan/test_command_generator.rb in scan-0.3.0

- old
+ new

@@ -32,10 +32,11 @@ options = [] options += project_path_array options << "-configuration '#{config[:configuration]}'" if config[:configuration] options << "-sdk '#{config[:sdk]}'" if config[:sdk] options << "-destination '#{config[:destination]}'" # generated in `detect_values` + options << "-enableCodeCoverage YES" if config[:code_coverage] options << "-xcconfig '#{config[:xcconfig]}'" if config[:xcconfig] options << config[:xcargs] if config[:xcargs] options end @@ -57,16 +58,24 @@ end def pipe # During building we just show the output in the terminal # Check out the ReportCollector class for more xcpretty things - formatter = "" + formatter = [] if Helper.ci? - formatter = "-f `xcpretty-travis-formatter`" + formatter << "-f `xcpretty-travis-formatter`" Helper.log.info "Automatically switched to Travis formatter".green end - ["| tee '#{xcodebuild_log_path}' | xcpretty #{formatter}"] + if Scan.config[:output_style] == 'basic' + formatter << "--no-utf" + end + + if Scan.config[:output_style] == 'rspec' + formatter << "--test" + end + + ["| tee '#{xcodebuild_log_path}' | xcpretty #{formatter.join(' ')}"] end # Store the raw file def xcodebuild_log_path file_name = "#{Scan.project.app_name}-#{Scan.config[:scheme]}.log"