xcpretty 0.0.6 → 0.0.7
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 +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +3 -1
- data/CHANGELOG.md +24 -0
- data/README.md +3 -1
- data/Rakefile +6 -1
- data/bin/xcpretty +51 -16
- data/features/custom_formatter.feature +15 -0
- data/features/junit_report.feature +9 -1
- data/features/simple_format.feature +68 -4
- data/features/steps/formatting_steps.rb +87 -4
- data/features/steps/junit_steps.rb +18 -6
- data/features/steps/xcpretty_steps.rb +7 -0
- data/features/support/env.rb +18 -15
- data/features/test_format.feature +1 -0
- data/features/xcpretty.feature +12 -0
- data/lib/xcpretty.rb +25 -3
- data/lib/xcpretty/ansi.rb +1 -0
- data/lib/xcpretty/formatters/formatter.rb +90 -0
- data/lib/xcpretty/formatters/rspec.rb +22 -0
- data/lib/xcpretty/formatters/simple.rb +137 -0
- data/lib/xcpretty/parser.rb +283 -0
- data/lib/xcpretty/printer.rb +7 -112
- data/lib/xcpretty/reporters/junit.rb +53 -45
- data/lib/xcpretty/syntax.rb +22 -0
- data/lib/xcpretty/version.rb +1 -1
- data/spec/fixtures/constants.rb +63 -15
- data/spec/fixtures/custom_formatter.rb +17 -0
- data/spec/spec_helper.rb +1 -1
- data/spec/support/matchers/colors.rb +1 -1
- data/spec/xcpretty/formatters/formatter_spec.rb +56 -0
- data/spec/xcpretty/formatters/rspec_spec.rb +46 -0
- data/spec/xcpretty/formatters/simple_spec.rb +132 -0
- data/spec/xcpretty/parser_spec.rb +258 -0
- data/spec/xcpretty/printer_spec.rb +39 -74
- data/spec/xcpretty/syntax_spec.rb +35 -0
- data/xcpretty.gemspec +1 -1
- metadata +40 -25
- data/lib/xcpretty/printers/rspec.rb +0 -23
- data/lib/xcpretty/printers/simple.rb +0 -153
- data/spec/xcpretty/printers/printer_spec.rb +0 -117
- data/spec/xcpretty/printers/rspec_spec.rb +0 -52
- data/spec/xcpretty/printers/simple_spec.rb +0 -125
@@ -1,52 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
require "xcpretty/printer"
|
3
|
-
require "xcpretty/printers/rspec"
|
4
|
-
|
5
|
-
module XCPretty
|
6
|
-
|
7
|
-
module Printer
|
8
|
-
|
9
|
-
describe RSpec do
|
10
|
-
|
11
|
-
it "prints dots in the same line" do
|
12
|
-
STDOUT.should receive(:print)
|
13
|
-
subject.pretty_print(SAMPLE_OCUNIT_TEST)
|
14
|
-
end
|
15
|
-
|
16
|
-
context "without colors" do
|
17
|
-
|
18
|
-
it "prints green dots for passing tests" do
|
19
|
-
subject.pretty_format(SAMPLE_OCUNIT_TEST).should == "."
|
20
|
-
end
|
21
|
-
|
22
|
-
it "prints F for failing tests" do
|
23
|
-
subject.pretty_format(SAMPLE_KIWI_FAILURE).should == "F"
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
context "with colors" do
|
28
|
-
|
29
|
-
before { subject.colorize = true }
|
30
|
-
|
31
|
-
it "prints green for passing tests" do
|
32
|
-
subject.pretty_format(SAMPLE_OCUNIT_TEST).should be_colored :green
|
33
|
-
end
|
34
|
-
|
35
|
-
it "prints red for failing tests" do
|
36
|
-
subject.pretty_format(SAMPLE_KIWI_FAILURE).should be_colored :red
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
describe "doesn't output any compiling output" do
|
41
|
-
|
42
|
-
it "compiling output" do
|
43
|
-
subject.pretty_format(SAMPLE_COMPILE).should == ""
|
44
|
-
end
|
45
|
-
|
46
|
-
it "clean target/project/configuration with nested pods" do
|
47
|
-
subject.pretty_format(SAMPLE_CLEAN).should == ""
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
@@ -1,125 +0,0 @@
|
|
1
|
-
require "xcpretty/printer"
|
2
|
-
require "xcpretty/printers/simple"
|
3
|
-
require "fixtures/constants"
|
4
|
-
|
5
|
-
module XCPretty
|
6
|
-
|
7
|
-
module Printer
|
8
|
-
|
9
|
-
describe Simple do
|
10
|
-
|
11
|
-
it "prints to stdout" do
|
12
|
-
STDOUT.should receive(:print)
|
13
|
-
subject.pretty_print(SAMPLE_CLEAN)
|
14
|
-
end
|
15
|
-
|
16
|
-
it "doesn't print empty lines" do
|
17
|
-
STDOUT.should_not receive(:print)
|
18
|
-
subject.pretty_print("")
|
19
|
-
end
|
20
|
-
|
21
|
-
it "parses compiling output" do
|
22
|
-
subject.pretty_format(SAMPLE_COMPILE).should ==
|
23
|
-
"> Compiling NSMutableArray+ObjectiveSugar.m"
|
24
|
-
end
|
25
|
-
|
26
|
-
it "parses another compiling output" do
|
27
|
-
subject.pretty_format(SAMPLE_ANOTHER_COMPILE).should ==
|
28
|
-
"> Compiling KWNull.m"
|
29
|
-
end
|
30
|
-
|
31
|
-
it "parses precompiling output" do
|
32
|
-
subject.pretty_format(SAMPLE_PRECOMPILE).should ==
|
33
|
-
"> Precompiling Pods-CocoaLumberjack-prefix.pch"
|
34
|
-
end
|
35
|
-
|
36
|
-
it "parses another precompiling output" do
|
37
|
-
subject.pretty_format(SAMPLE_ANOTHER_PRECOMPILE).should ==
|
38
|
-
"> Precompiling Pods-CrittercismSDK-prefix.pch"
|
39
|
-
end
|
40
|
-
|
41
|
-
it "parses clean remove output" do
|
42
|
-
subject.pretty_format(SAMPLE_CLEAN_REMOVE).should == ""
|
43
|
-
end
|
44
|
-
|
45
|
-
it "kills 'Check dependencies'" do
|
46
|
-
subject.pretty_format("Check dependencies").should == ""
|
47
|
-
end
|
48
|
-
|
49
|
-
it "parses clean target/project/configuration" do
|
50
|
-
subject.pretty_format(SAMPLE_CLEAN).should ==
|
51
|
-
"> Cleaning Pods/ObjectiveSugar [Debug]"
|
52
|
-
end
|
53
|
-
|
54
|
-
it "parses another clean target/project/configuration" do
|
55
|
-
subject.pretty_format(SAMPLE_ANOTHER_CLEAN).should ==
|
56
|
-
"> Cleaning Pods/Pods [Debug]"
|
57
|
-
end
|
58
|
-
|
59
|
-
it "parses build target/project/configuration with target" do
|
60
|
-
subject.pretty_format(SAMPLE_BUILD).should ==
|
61
|
-
"> Building Pods/The Spacer [Debug]"
|
62
|
-
end
|
63
|
-
|
64
|
-
it "parses clean target/project/configuration with nested pods" do
|
65
|
-
subject.pretty_format(SAMPLE_CLEAN_NESTED_PODS).should ==
|
66
|
-
"> Cleaning Pods/Kiwi [Debug]"
|
67
|
-
end
|
68
|
-
|
69
|
-
it "parses PhaseScriptExecution" do
|
70
|
-
subject.pretty_format(SAMPLE_RUN_SCRIPT).should ==
|
71
|
-
"> Running script 'Check Pods Manifest.lock'"
|
72
|
-
end
|
73
|
-
|
74
|
-
it "parses Libtool" do
|
75
|
-
subject.pretty_format(SAMPLE_LIBTOOL).should ==
|
76
|
-
"> Building library libPods-ObjectiveSugarTests-Kiwi.a"
|
77
|
-
end
|
78
|
-
|
79
|
-
it "parses CpResource" do
|
80
|
-
subject.pretty_format(SAMPLE_CPRESOURCE).should ==
|
81
|
-
"> Copying ObjectiveSugar/Default-568h@2x.png"
|
82
|
-
end
|
83
|
-
|
84
|
-
it "parses CopyStringsFile" do
|
85
|
-
subject.pretty_format(SAMPLE_COPYSTRINGS).should ==
|
86
|
-
"> Copying InfoPlist.strings"
|
87
|
-
end
|
88
|
-
|
89
|
-
it "parses GenerateDSYMFile" do
|
90
|
-
subject.pretty_format(SAMPLE_DSYM).should ==
|
91
|
-
"> Generating DSYM file"
|
92
|
-
end
|
93
|
-
|
94
|
-
it "parses info.plist processing" do
|
95
|
-
subject.pretty_format(SAMPLE_PROCESS_INFOPLIST).should ==
|
96
|
-
"> Processing The Spacer-Info.plist"
|
97
|
-
end
|
98
|
-
|
99
|
-
it "parses Ld" do
|
100
|
-
subject.pretty_format(SAMPLE_LD).should ==
|
101
|
-
"> Linking ObjectiveSugar"
|
102
|
-
end
|
103
|
-
|
104
|
-
it "parses passing tests" do
|
105
|
-
subject.pretty_format(SAMPLE_OCUNIT_TEST).should ==
|
106
|
-
". _tupleByAddingObject__should_add_a_non_nil_object (0.001 seconds)"
|
107
|
-
end
|
108
|
-
|
109
|
-
it "parses failing tests" do
|
110
|
-
subject.pretty_format(SAMPLE_SPECTA_FAILURE).should ==
|
111
|
-
"x enabled_signal_should_send_YES_while_executing_is_YES_and_allowsConcurrentExecution_is_YES, expected: 1, got: 0"
|
112
|
-
end
|
113
|
-
|
114
|
-
it "parses test run started" do
|
115
|
-
subject.pretty_format(SAMPLE_OCUNIT_TEST_RUN_BEGINNING).should ==
|
116
|
-
"Test Suite ReactiveCocoaTests.octest(Tests) started"
|
117
|
-
end
|
118
|
-
|
119
|
-
it "parses test suite started" do
|
120
|
-
subject.pretty_format(SAMPLE_OCUNIT_SUITE_BEGINNING).should ==
|
121
|
-
"RACKVOWrapperSpec"
|
122
|
-
end
|
123
|
-
end
|
124
|
-
end
|
125
|
-
end
|