learn-xcpretty 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.kick +17 -0
- data/.travis.yml +18 -0
- data/CHANGELOG.md +152 -0
- data/CONTRIBUTING.md +60 -0
- data/Gemfile +8 -0
- data/LICENSE.txt +61 -0
- data/README.md +143 -0
- data/Rakefile +24 -0
- data/assets/report.html.erb +155 -0
- data/bin/learn-xcpretty +80 -0
- data/features/custom_formatter.feature +15 -0
- data/features/fixtures/xcodebuild.log +5963 -0
- data/features/html_report.feature +40 -0
- data/features/json_compilation_database_report.feature +21 -0
- data/features/junit_report.feature +44 -0
- data/features/knock_format.feature +11 -0
- data/features/simple_format.feature +172 -0
- data/features/steps/formatting_steps.rb +268 -0
- data/features/steps/html_steps.rb +23 -0
- data/features/steps/json_steps.rb +37 -0
- data/features/steps/junit_steps.rb +38 -0
- data/features/steps/report_steps.rb +21 -0
- data/features/steps/xcpretty_steps.rb +31 -0
- data/features/support/env.rb +108 -0
- data/features/tap_format.feature +31 -0
- data/features/test_format.feature +39 -0
- data/features/xcpretty.feature +14 -0
- data/learn-xcpretty.gemspec +37 -0
- data/lib/xcpretty/ansi.rb +71 -0
- data/lib/xcpretty/formatters/formatter.rb +134 -0
- data/lib/xcpretty/formatters/knock.rb +34 -0
- data/lib/xcpretty/formatters/rspec.rb +27 -0
- data/lib/xcpretty/formatters/simple.rb +155 -0
- data/lib/xcpretty/formatters/tap.rb +39 -0
- data/lib/xcpretty/parser.rb +421 -0
- data/lib/xcpretty/printer.rb +20 -0
- data/lib/xcpretty/reporters/html.rb +73 -0
- data/lib/xcpretty/reporters/json_compilation_database.rb +58 -0
- data/lib/xcpretty/reporters/junit.rb +99 -0
- data/lib/xcpretty/reporters/learn.rb +154 -0
- data/lib/xcpretty/snippet.rb +34 -0
- data/lib/xcpretty/syntax.rb +20 -0
- data/lib/xcpretty/version.rb +3 -0
- data/lib/xcpretty.rb +39 -0
- data/spec/fixtures/NSStringTests.m +64 -0
- data/spec/fixtures/constants.rb +546 -0
- data/spec/fixtures/custom_formatter.rb +17 -0
- data/spec/fixtures/oneliner.m +1 -0
- data/spec/fixtures/raw_kiwi_compilation_fail.txt +24 -0
- data/spec/fixtures/raw_kiwi_fail.txt +1896 -0
- data/spec/fixtures/raw_specta_fail.txt +3110 -0
- data/spec/spec_helper.rb +6 -0
- data/spec/support/matchers/colors.rb +20 -0
- data/spec/xcpretty/ansi_spec.rb +46 -0
- data/spec/xcpretty/formatters/formatter_spec.rb +113 -0
- data/spec/xcpretty/formatters/rspec_spec.rb +55 -0
- data/spec/xcpretty/formatters/simple_spec.rb +129 -0
- data/spec/xcpretty/parser_spec.rb +421 -0
- data/spec/xcpretty/printer_spec.rb +53 -0
- data/spec/xcpretty/snippet_spec.rb +39 -0
- data/spec/xcpretty/syntax_spec.rb +35 -0
- data/vendor/json_pure/COPYING +57 -0
- data/vendor/json_pure/LICENSE +340 -0
- data/vendor/json_pure/generator.rb +443 -0
- data/vendor/json_pure/parser.rb +364 -0
- metadata +261 -0
@@ -0,0 +1,40 @@
|
|
1
|
+
Feature: Creating a HTML test report
|
2
|
+
|
3
|
+
Background:
|
4
|
+
Given the tests have started running
|
5
|
+
|
6
|
+
Scenario: Showing a test suite
|
7
|
+
Given I have a passing test in my suite
|
8
|
+
When I pipe to xcpretty with "--report html"
|
9
|
+
Then I should see a test suite section in HTML
|
10
|
+
|
11
|
+
Scenario: Showing failed tests
|
12
|
+
Given I have a failing test in my suite
|
13
|
+
When I pipe to xcpretty with "--report html"
|
14
|
+
Then I should see a failed test in HTML
|
15
|
+
And the failure counter should show 1 test
|
16
|
+
|
17
|
+
Scenario: Showing passing tests
|
18
|
+
Given I have a passing test in my suite
|
19
|
+
When I pipe to xcpretty with "--report html"
|
20
|
+
Then I should see a passing test in HTML
|
21
|
+
|
22
|
+
Scenario: Counting tests
|
23
|
+
Given I have a passing test in my suite
|
24
|
+
And I have a failing test in my suite
|
25
|
+
And the test suite has finished
|
26
|
+
When I pipe to xcpretty with "--report html"
|
27
|
+
Then I should see 2 tests in HTML
|
28
|
+
|
29
|
+
Scenario: Having many test classes
|
30
|
+
Given I have tests in my suite from 2 classes
|
31
|
+
When I pipe to xcpretty with "--report html"
|
32
|
+
Then I should see 2 test suite sections in HTML
|
33
|
+
|
34
|
+
Scenario: Writing to a custom file path
|
35
|
+
When I pipe to xcpretty with "--report html" and specify a custom path
|
36
|
+
Then I should have a test report in a custom path
|
37
|
+
|
38
|
+
Scenario: Writing to multiple custom file paths
|
39
|
+
When I pipe to xcpretty with two custom "html" report paths
|
40
|
+
Then I should have test reports in two custom paths
|
@@ -0,0 +1,21 @@
|
|
1
|
+
Feature: Create a JSON compilation database
|
2
|
+
|
3
|
+
Scenario: Showing file compilation
|
4
|
+
Given I have a file to compile
|
5
|
+
When I pipe to xcpretty with "--report json-compilation-database" and specify a custom path
|
6
|
+
Then the JSON compilation database should contain an entry with a command
|
7
|
+
Then the JSON compilation database should contain an entry with a directory
|
8
|
+
Then the JSON compilation database should contain an entry with a file
|
9
|
+
|
10
|
+
Scenario: Handling a complete xcodebuild session
|
11
|
+
Given some big input
|
12
|
+
When I pipe to xcpretty with "--report json-compilation-database" and specify a custom path
|
13
|
+
Then the JSON compilation database should be complete
|
14
|
+
|
15
|
+
Scenario: Writing to a custom file path
|
16
|
+
When I pipe to xcpretty with "--report json-compilation-database" and specify a custom path
|
17
|
+
Then I should have a JSON compilation database in a custom path
|
18
|
+
|
19
|
+
Scenario: Writing to multiple custom file paths
|
20
|
+
When I pipe to xcpretty with two custom "json-compilation-database" report paths
|
21
|
+
Then I should have JSON compilation databases in two custom paths
|
@@ -0,0 +1,44 @@
|
|
1
|
+
Feature: Creating a JUnit test report
|
2
|
+
|
3
|
+
Background:
|
4
|
+
Given the tests have started running
|
5
|
+
|
6
|
+
Scenario: Showing a test suite
|
7
|
+
Given I have a passing test in my suite
|
8
|
+
When I pipe to xcpretty with "--report junit"
|
9
|
+
Then I should see a test suite node
|
10
|
+
|
11
|
+
Scenario: Showing pending test output
|
12
|
+
Given I have a pending test in my suite
|
13
|
+
When I pipe to xcpretty with "--report junit"
|
14
|
+
Then I should see a pending test node in my report
|
15
|
+
|
16
|
+
Scenario: Showing failed tests
|
17
|
+
Given I have a failing test in my suite
|
18
|
+
When I pipe to xcpretty with "--report junit"
|
19
|
+
Then I should see a failed test node in my report
|
20
|
+
|
21
|
+
Scenario: Showing passing tests
|
22
|
+
Given I have a passing test in my suite
|
23
|
+
When I pipe to xcpretty with "--report junit"
|
24
|
+
Then I should see a passing test node in my report
|
25
|
+
|
26
|
+
Scenario: Counting tests
|
27
|
+
Given I have a passing test in my suite
|
28
|
+
And I have a failing test in my suite
|
29
|
+
And the test suite has finished
|
30
|
+
When I pipe to xcpretty with "--report junit"
|
31
|
+
Then I should see 2 tests in my report
|
32
|
+
|
33
|
+
Scenario: Having many test classes
|
34
|
+
Given I have tests in my suite from 2 classes
|
35
|
+
When I pipe to xcpretty with "--report junit"
|
36
|
+
Then I should see 2 test suites
|
37
|
+
|
38
|
+
Scenario: Writing to a custom file path
|
39
|
+
When I pipe to xcpretty with "--report junit" and specify a custom path
|
40
|
+
Then I should have a test report in a custom path
|
41
|
+
|
42
|
+
Scenario: Writing to multiple custom file paths
|
43
|
+
When I pipe to xcpretty with two custom "junit" report paths
|
44
|
+
Then I should have test reports in two custom paths
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Feature: Showing Knock-style test output
|
2
|
+
|
3
|
+
Scenario: Showing failed tests
|
4
|
+
Given I have a failing test in my suite
|
5
|
+
When I pipe to xcpretty with "--knock"
|
6
|
+
Then I should see text beginning with "not ok"
|
7
|
+
|
8
|
+
Scenario: Showing passing tests
|
9
|
+
Given I have a passing test in my suite
|
10
|
+
When I pipe to xcpretty with "--knock"
|
11
|
+
Then I should see text beginning with "ok"
|
@@ -0,0 +1,172 @@
|
|
1
|
+
Feature: Showing build output in simple format
|
2
|
+
|
3
|
+
Scenario: Showing file compilation
|
4
|
+
Given I have a file to compile
|
5
|
+
When I pipe to xcpretty with "--simple"
|
6
|
+
Then I should see a successful compilation message
|
7
|
+
|
8
|
+
Scenario: Showing xib compilation
|
9
|
+
Given I have a xib to compile
|
10
|
+
When I pipe to xcpretty with "--simple"
|
11
|
+
Then I should see a successful compilation message
|
12
|
+
|
13
|
+
Scenario: Showing precompilation
|
14
|
+
Given I have a precompiled header
|
15
|
+
When I pipe to xcpretty with "--simple"
|
16
|
+
Then I should see a successful precompilation message
|
17
|
+
|
18
|
+
Scenario: Showing file compilation with color
|
19
|
+
Given I have a file to compile
|
20
|
+
When I pipe to xcpretty with "--simple --color"
|
21
|
+
Then I should see a yellow completion icon
|
22
|
+
|
23
|
+
Scenario: Showing xib compilation with color
|
24
|
+
Given I have a xib to compile
|
25
|
+
When I pipe to xcpretty with "--simple --color"
|
26
|
+
Then I should see a yellow completion icon
|
27
|
+
|
28
|
+
Scenario: Showing precompilation
|
29
|
+
Given I have a precompiled header
|
30
|
+
When I pipe to xcpretty with "--simple --color"
|
31
|
+
Then I should see a yellow completion icon
|
32
|
+
|
33
|
+
Scenario: Showing analyze
|
34
|
+
Given I have a file to analyze
|
35
|
+
When I pipe to xcpretty with "--simple"
|
36
|
+
Then I should see a successful analyze message
|
37
|
+
|
38
|
+
Scenario: Showing shallow analyze
|
39
|
+
Given I have a file to shallow analyze
|
40
|
+
When I pipe to xcpretty with "--simple"
|
41
|
+
Then I should see a successful analyze message
|
42
|
+
|
43
|
+
Scenario: Showing tiff file validation
|
44
|
+
Given I have a tiff file to validate
|
45
|
+
When I pipe to xcpretty with "--simple"
|
46
|
+
Then I should see a successful tiff validation message
|
47
|
+
|
48
|
+
Scenario: Showing touch file
|
49
|
+
Given I have a file to touch
|
50
|
+
When I pipe to xcpretty with "--simple"
|
51
|
+
Then I should see a successful touch message
|
52
|
+
|
53
|
+
Scenario: Showing analyze with color
|
54
|
+
Given I have a file to analyze
|
55
|
+
When I pipe to xcpretty with "--simple --color"
|
56
|
+
Then I should see a yellow completion icon
|
57
|
+
|
58
|
+
Scenario: Showing shallow analyze with color
|
59
|
+
Given I have a file to shallow analyze
|
60
|
+
When I pipe to xcpretty with "--simple --color"
|
61
|
+
Then I should see a yellow completion icon
|
62
|
+
|
63
|
+
Scenario: Showing tiff file validation with color
|
64
|
+
Given I have a tiff file to validate
|
65
|
+
When I pipe to xcpretty with "--simple --color"
|
66
|
+
Then I should see a yellow completion icon
|
67
|
+
|
68
|
+
Scenario: Showing touch file with color
|
69
|
+
Given I have a file to touch
|
70
|
+
When I pipe to xcpretty with "--simple --color"
|
71
|
+
Then I should see a yellow completion icon
|
72
|
+
|
73
|
+
Scenario: Showing the start of a test run
|
74
|
+
Given the tests have started running
|
75
|
+
When I pipe to xcpretty with "--simple"
|
76
|
+
Then I should see that test suite has started
|
77
|
+
|
78
|
+
Scenario: Showing the start of a test suite
|
79
|
+
Given I start a test suite
|
80
|
+
When I pipe to xcpretty with "--simple"
|
81
|
+
Then I should see the name of suite only
|
82
|
+
|
83
|
+
Scenario: Showing the end of a test suite
|
84
|
+
Given the test suite has finished
|
85
|
+
When I pipe to xcpretty with "--simple"
|
86
|
+
Then I should see that the test suite finished
|
87
|
+
|
88
|
+
Scenario: Showing failed test output
|
89
|
+
Given I have a failing test in my suite
|
90
|
+
And the test suite has finished
|
91
|
+
When I pipe to xcpretty with "--simple"
|
92
|
+
Then I should see the name of a failed test
|
93
|
+
And I should see the path of a failed test
|
94
|
+
|
95
|
+
Scenario: Showing successful test output
|
96
|
+
Given I have a passing test in my suite
|
97
|
+
When I pipe to xcpretty with "--simple"
|
98
|
+
Then I should see the name of a passing test
|
99
|
+
And I should not see the name of the test group
|
100
|
+
And I should not see the path of a passing test
|
101
|
+
|
102
|
+
Scenario: Colorizing slow-ish tests in yellow
|
103
|
+
Given I have a slow-ish test in my suite
|
104
|
+
When I pipe to xcpretty with "--simple --color"
|
105
|
+
Then I should see the test time in yellow
|
106
|
+
|
107
|
+
Scenario: Colorizing slow tests in red
|
108
|
+
Given I have a slow test in my suite
|
109
|
+
When I pipe to xcpretty with "--simple --color"
|
110
|
+
Then I should see the test time in red
|
111
|
+
|
112
|
+
Scenario: Showing pending test output
|
113
|
+
Given I have a pending test in my suite
|
114
|
+
When I pipe to xcpretty with "--simple"
|
115
|
+
Then I should see the name of a pending test
|
116
|
+
|
117
|
+
Scenario: Showing failed test output with color
|
118
|
+
Given I have a failing test in my suite
|
119
|
+
And the test suite has finished
|
120
|
+
When I pipe to xcpretty with "--simple --color"
|
121
|
+
Then I should see a red failed test mark
|
122
|
+
And the final execution message should be red
|
123
|
+
|
124
|
+
Scenario: Showing successful test output with color
|
125
|
+
Given I have a passing test in my suite
|
126
|
+
And the test suite has finished
|
127
|
+
When I pipe to xcpretty with "--simple --color"
|
128
|
+
Then I should see a green passing test mark
|
129
|
+
|
130
|
+
Scenario: Running tests without UTF-8 support
|
131
|
+
Given I have a passing test in my suite
|
132
|
+
And I pipe to xcpretty with "--no-utf --color"
|
133
|
+
Then I should see a non-utf prefixed output
|
134
|
+
|
135
|
+
Scenario: Showing code signing
|
136
|
+
Given I have a file to code sign
|
137
|
+
When I pipe to xcpretty with "--simple"
|
138
|
+
Then I should see a successful code signing message
|
139
|
+
|
140
|
+
Scenario: Showing code signing a framework
|
141
|
+
Given I have a framework to code sign
|
142
|
+
When I pipe to xcpretty with "--simple"
|
143
|
+
Then I should see a successful code signing message
|
144
|
+
|
145
|
+
Scenario: Showing preprocess
|
146
|
+
Given I have a file to preprocess
|
147
|
+
When I pipe to xcpretty with "--simple"
|
148
|
+
Then I should see a successful preprocessing message
|
149
|
+
|
150
|
+
Scenario: Showing a PBXCp copy
|
151
|
+
Given I have a file to copy with PBXCp
|
152
|
+
When I pipe to xcpretty with "--simple"
|
153
|
+
Then I should see a successful copying message
|
154
|
+
|
155
|
+
Scenario: Build fails when Pod install hasn't been run
|
156
|
+
Given podfile.lock wasn't in sync
|
157
|
+
When I pipe to xcpretty with "--simple --color"
|
158
|
+
Then I should see a red error message
|
159
|
+
|
160
|
+
Scenario: Compilation fails because of syntax errors
|
161
|
+
Given there was a syntax error
|
162
|
+
When I pipe to xcpretty with "--simple --color"
|
163
|
+
Then I should see a red compilation error
|
164
|
+
And I should see a failed line
|
165
|
+
And I should see a cyan cursor
|
166
|
+
|
167
|
+
Scenario: Linker fails with undefined symbols
|
168
|
+
Given the linker has failed with undefined symbols
|
169
|
+
When I pipe to xcpretty with "--simple --color"
|
170
|
+
Then I should see the undefined symbold message
|
171
|
+
And I should see the symbol and reference that caused failure
|
172
|
+
|
@@ -0,0 +1,268 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
Given(/^I have a file to compile$/) do
|
3
|
+
add_run_input SAMPLE_COMPILE
|
4
|
+
end
|
5
|
+
|
6
|
+
Given(/^I have a xib to compile$/) do
|
7
|
+
add_run_input SAMPLE_COMPILE_XIB
|
8
|
+
end
|
9
|
+
|
10
|
+
Given(/^I have a precompiled header$/) do
|
11
|
+
add_run_input SAMPLE_PRECOMPILE
|
12
|
+
end
|
13
|
+
|
14
|
+
Given(/^I have a file to analyze$/) do
|
15
|
+
add_run_input SAMPLE_ANALYZE
|
16
|
+
end
|
17
|
+
|
18
|
+
Given(/^I have a file to shallow analyze$/) do
|
19
|
+
add_run_input SAMPLE_ANALYZE_SHALLOW
|
20
|
+
end
|
21
|
+
|
22
|
+
Given(/^I have a failing test in my suite$/) do
|
23
|
+
add_run_input SAMPLE_OLD_SPECTA_FAILURE
|
24
|
+
end
|
25
|
+
|
26
|
+
Given(/^all of my tests will pass in my suite$/) do
|
27
|
+
3.times { add_run_input SAMPLE_OCUNIT_TEST }
|
28
|
+
end
|
29
|
+
|
30
|
+
Given(/^I have a passing test in my suite$/) do
|
31
|
+
add_run_input SAMPLE_OCUNIT_TEST
|
32
|
+
end
|
33
|
+
|
34
|
+
Given(/^I have a slow\-ish test in my suite$/) do
|
35
|
+
add_run_input SAMPLE_SLOWISH_TEST
|
36
|
+
end
|
37
|
+
|
38
|
+
Given(/^I have a slow test in my suite$/) do
|
39
|
+
add_run_input SAMPLE_SLOW_TEST
|
40
|
+
end
|
41
|
+
|
42
|
+
Given(/^the tests have started running$/) do
|
43
|
+
add_run_input SAMPLE_OCUNIT_TEST_RUN_BEGINNING
|
44
|
+
end
|
45
|
+
|
46
|
+
Given(/^I start a test suite$/) do
|
47
|
+
add_run_input SAMPLE_OCUNIT_SUITE_BEGINNING
|
48
|
+
end
|
49
|
+
|
50
|
+
Given(/^the test suite has finished$/) do
|
51
|
+
add_run_input SAMPLE_OCUNIT_SUITE_COMPLETION
|
52
|
+
add_run_input SAMPLE_EXECUTED_TESTS
|
53
|
+
end
|
54
|
+
|
55
|
+
Given(/^I have a file to code sign$/) do
|
56
|
+
add_run_input SAMPLE_CODESIGN
|
57
|
+
end
|
58
|
+
|
59
|
+
Given(/^I have a framework to code sign$/) do
|
60
|
+
add_run_input SAMPLE_CODESIGN_FRAMEWORK
|
61
|
+
end
|
62
|
+
|
63
|
+
Given(/^I have a file to preprocess$/) do
|
64
|
+
add_run_input SAMPLE_PREPROCESS
|
65
|
+
end
|
66
|
+
|
67
|
+
Given(/^I have a file to copy with PBXCp/) do
|
68
|
+
add_run_input SAMPLE_PBXCP
|
69
|
+
end
|
70
|
+
|
71
|
+
Given(/^podfile.lock wasn't in sync$/) do
|
72
|
+
add_run_input SAMPLE_PODS_ERROR
|
73
|
+
end
|
74
|
+
|
75
|
+
Given(/^there was a syntax error$/) do
|
76
|
+
add_run_input SAMPLE_COMPILE_ERROR
|
77
|
+
end
|
78
|
+
|
79
|
+
Given(/^the linker has failed with undefined symbols$/) do
|
80
|
+
add_run_input SAMPLE_UNDEFINED_SYMBOLS
|
81
|
+
end
|
82
|
+
|
83
|
+
Given(/^I have a pending test in my suite$/) do
|
84
|
+
add_run_input SAMPLE_PENDING_KIWI_TEST
|
85
|
+
end
|
86
|
+
|
87
|
+
Given(/^I have a tiff file to validate$/) do
|
88
|
+
add_run_input SAMPLE_TIFFUTIL
|
89
|
+
end
|
90
|
+
|
91
|
+
Given(/^I have a file to touch$/) do
|
92
|
+
add_run_input SAMPLE_TOUCH
|
93
|
+
end
|
94
|
+
|
95
|
+
Then(/^I should see text beginning with "(.*?)"$/) do |text|
|
96
|
+
run_output.lines.to_a.detect {|line| line.start_with? text }.should_not be_nil
|
97
|
+
end
|
98
|
+
|
99
|
+
Then(/^I should see text containing "(.*?)" and beginning with "(.*?)"$/) do |inner, start|
|
100
|
+
run_output.lines.to_a.detect {|line| line.start_with?(start) && line.include?(inner)}.should_not be_nil
|
101
|
+
end
|
102
|
+
|
103
|
+
Then(/^I should (green|red) text beginning with "(.*?)"$/) do |color, text|
|
104
|
+
run_output.should start_with(send(color.to_sym, text))
|
105
|
+
end
|
106
|
+
|
107
|
+
Then(/^I should see a successful tiff validation message$/) do
|
108
|
+
run_output.should start_with("â–¸ Validating")
|
109
|
+
end
|
110
|
+
|
111
|
+
Then(/^I should see a successful touch message$/) do
|
112
|
+
run_output.should start_with("â–¸ Touching")
|
113
|
+
end
|
114
|
+
|
115
|
+
When(/^I pipe to xcpretty with "(.*?)"$/) do |flags|
|
116
|
+
run_xcpretty(flags)
|
117
|
+
end
|
118
|
+
|
119
|
+
When(/^I pipe to xcpretty with a custom formatter$/) do
|
120
|
+
formatter_path = File.expand_path('../../../spec/fixtures/custom_formatter.rb', __FILE__)
|
121
|
+
run_xcpretty("-f #{formatter_path}")
|
122
|
+
end
|
123
|
+
|
124
|
+
Then(/^I should see a custom compilation message$/) do
|
125
|
+
run_output.should start_with("😎 Compilation party time")
|
126
|
+
end
|
127
|
+
|
128
|
+
Then(/^I should see a successful compilation message$/) do
|
129
|
+
run_output.should start_with("â–¸ Compiling")
|
130
|
+
end
|
131
|
+
|
132
|
+
Then(/^I should see a successful precompilation message$/) do
|
133
|
+
run_output.should start_with("â–¸ Precompiling")
|
134
|
+
end
|
135
|
+
|
136
|
+
Then(/^I should see a successful analyze message$/) do
|
137
|
+
run_output.should start_with("â–¸ Analyzing")
|
138
|
+
end
|
139
|
+
|
140
|
+
Then(/^I should see a successful code signing message$/) do
|
141
|
+
run_output.should start_with("â–¸ Signing")
|
142
|
+
end
|
143
|
+
|
144
|
+
Then(/^I should see a successful preprocessing message$/) do
|
145
|
+
run_output.should start_with("â–¸ Preprocessing")
|
146
|
+
end
|
147
|
+
|
148
|
+
Then(/^I should see a successful copying message$/) do
|
149
|
+
run_output.should start_with("â–¸ Copying")
|
150
|
+
end
|
151
|
+
|
152
|
+
Then(/^I should see a yellow completion icon$/) do
|
153
|
+
run_output.should start_with(yellow("â–¸"))
|
154
|
+
end
|
155
|
+
|
156
|
+
Then(/^I should see a failed test icon$/) do
|
157
|
+
run_output.should start_with("F")
|
158
|
+
end
|
159
|
+
|
160
|
+
Then(/^I should see a passing test icon in ASCII$/) do
|
161
|
+
run_output.should start_with(".")
|
162
|
+
end
|
163
|
+
|
164
|
+
Then(/^I should see a red failed test icon$/) do
|
165
|
+
run_output.should include(red("F"))
|
166
|
+
end
|
167
|
+
|
168
|
+
Then(/^I should see a pending test icon in ASCII$/) do
|
169
|
+
run_output.should start_with("P")
|
170
|
+
end
|
171
|
+
|
172
|
+
Then(/^I should see a yellow pending test icon$/) do
|
173
|
+
run_output.should start_with(yellow("P"))
|
174
|
+
end
|
175
|
+
|
176
|
+
Then(/^the final execution message should be (red|green)$/) do |color|
|
177
|
+
last_line = run_output.lines.to_a.last
|
178
|
+
last_line.should be_colored(color.to_sym)
|
179
|
+
end
|
180
|
+
|
181
|
+
Then(/^I should see a green passing test icon$/) do
|
182
|
+
run_output.should include(green("."))
|
183
|
+
end
|
184
|
+
|
185
|
+
Then(/^I should see the name of a failed test$/) do
|
186
|
+
run_output.should =~ FAILING_TEST_NAME_MATCHER
|
187
|
+
end
|
188
|
+
|
189
|
+
Then(/^I should see the path of a failed test$/) do
|
190
|
+
run_output.should =~ TEST_PATH_MATCHER
|
191
|
+
end
|
192
|
+
|
193
|
+
Then(/^I should see the name of a passing test$/) do
|
194
|
+
run_output.should =~ PASSING_TEST_NAME_MATCHER
|
195
|
+
end
|
196
|
+
|
197
|
+
Then(/^I should not see the path of a passing test$/) do
|
198
|
+
run_output.should_not =~ TEST_PATH_MATCHER
|
199
|
+
end
|
200
|
+
|
201
|
+
Then(/^I should see that test suite has started$/) do
|
202
|
+
run_output.should =~ TEST_RUN_START_MATCHER
|
203
|
+
end
|
204
|
+
|
205
|
+
Then(/^I should see the name of suite only$/) do
|
206
|
+
run_output.should =~ TEST_SUITE_START_MATCHER
|
207
|
+
end
|
208
|
+
|
209
|
+
Then(/^I should see that the test suite finished$/) do
|
210
|
+
run_output.strip.should =~ TEST_SUITE_COMPLETION_MATCHER
|
211
|
+
end
|
212
|
+
|
213
|
+
Then(/^I should see a red failed test mark$/) do
|
214
|
+
run_output.should include(red("✗"))
|
215
|
+
end
|
216
|
+
|
217
|
+
Then(/^I should see a green passing test mark$/) do
|
218
|
+
run_output.should include(green("✓"))
|
219
|
+
end
|
220
|
+
|
221
|
+
Then(/^I should see a non-utf prefixed output$/) do
|
222
|
+
run_output.should start_with(" " + green("."))
|
223
|
+
end
|
224
|
+
|
225
|
+
Then(/^I should not see the name of the test group$/) do
|
226
|
+
run_output.should_not include("RACTupleSpec")
|
227
|
+
end
|
228
|
+
|
229
|
+
Then(/^I should see a red error message$/) do
|
230
|
+
run_output.should include(red("⌦ " + SAMPLE_PODS_ERROR.gsub('error: ', '')))
|
231
|
+
end
|
232
|
+
|
233
|
+
Then(/^I should see a red compilation error$/) do
|
234
|
+
run_output.should include(red("expected identifier"))
|
235
|
+
end
|
236
|
+
|
237
|
+
Then(/^I should see a failed line$/) do
|
238
|
+
run_output.should include("[[thread.lastMessage should] equal:thread.];")
|
239
|
+
end
|
240
|
+
|
241
|
+
Then(/^I should see a cyan cursor$/) do
|
242
|
+
run_output.should include(cyan(" ^"))
|
243
|
+
end
|
244
|
+
|
245
|
+
Then(/^I should see the undefined symbold message$/) do
|
246
|
+
run_output.should include(red("⌦ Undefined symbols for architecture x86_64"))
|
247
|
+
end
|
248
|
+
|
249
|
+
Then(/^I should see the symbol and reference that caused failure$/) do
|
250
|
+
run_output.should include("_OBJC_CLASS_$_CABasicAnimation")
|
251
|
+
run_output.should include("objc-class-ref in ATZRadialProgressControl.o")
|
252
|
+
end
|
253
|
+
|
254
|
+
Then(/^I should see the name of a pending test$/) do
|
255
|
+
run_output.should =~ PENDING_TEST_NAME_MATCHER
|
256
|
+
end
|
257
|
+
|
258
|
+
Then(/^I should see the test time in yellow$/) do
|
259
|
+
run_output.should include("#{yellow("0.026")}")
|
260
|
+
end
|
261
|
+
|
262
|
+
Then(/^I should see the test time in red$/) do
|
263
|
+
run_output.should include("#{red("0.101")}")
|
264
|
+
end
|
265
|
+
|
266
|
+
Then(/^I should see text matching "(.*?)"$/) do |text|
|
267
|
+
run_output.lines.to_a.last.strip.should == text
|
268
|
+
end
|