Class: OCRunner::TestRunner
- Inherits:
-
Object
- Object
- OCRunner::TestRunner
show all
- Includes:
- Console
- Defined in:
- lib/ocrunner/test_runner.rb
Defined Under Namespace
Classes: BuildFailure
Instance Attribute Summary
Attributes included from Console
#output
Instance Method Summary
collapse
Methods included from Console
#blue, #clean_path, #colorize, #execute, #green, #growl, #indent, #out, #present, #red
Constructor Details
#initialize(options) ⇒ TestRunner
7
8
9
10
11
12
13
14
|
# File 'lib/ocrunner/test_runner.rb', line 7
def initialize(options)
@options = options
@processor = OutputProcessor.new($stdout, @options)
build_command
setup
run_tests
end
|
Instance Method Details
#build_command ⇒ Object
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/ocrunner/test_runner.rb', line 16
def build_command
@command = "xcodebuild -target #{@options[:target]} -configuration #{@options[:config]} " +
"-sdk #{@options[:sdk]} #{@options[:parallel] ? '-parallelizeTargets' : ''} build"
if @options[:debug_command]
present do
puts indent @command
end
exit
end
end
|
#run_tests ⇒ Object
33
34
35
36
37
38
|
# File 'lib/ocrunner/test_runner.rb', line 33
def run_tests
execute @command do |line|
@processor.process_line(line)
end
@processor.display_results
end
|
#setup ⇒ Object
27
28
29
30
31
|
# File 'lib/ocrunner/test_runner.rb', line 27
def setup
puts "-"*80
puts
puts "ocrunner started. control-c to exit, control-\\ to toggle verbosity\n\n"
end
|