|
126 | 126 | translator << "\tCodeSign build/Debug-iphoneos/ExampleProject.app"
|
127 | 127 | end
|
128 | 128 |
|
129 |
| - it "notifies the delegate of errors that occur throughout the build" do |
| 129 | + it "notifies the delegate of errors that occur throughout the build on < Xcode 4.3.2" do |
130 | 130 | delegate.should_receive(:build_error_detected).with(
|
131 | 131 | :file => "/ExampleProject/main.m",
|
132 | 132 | :line => 16,
|
|
135 | 135 | )
|
136 | 136 | translator << "/ExampleProject/main.m:16:42: error: expected ';' after expression [1]"
|
137 | 137 | end
|
| 138 | + it "notifies the delegate of errors that occur throughout the build on >= Xcode 4.3.2" do |
| 139 | + delegate.should_receive(:build_error_detected).with( |
| 140 | + :file => "/ExampleProject/main.m", |
| 141 | + :line => 16, |
| 142 | + :char => 42, |
| 143 | + :message => "expected ';' after expression [1]" |
| 144 | + ) |
| 145 | + translator << "/ExampleProject/main.m:16:42:something: error: expected ';' after expression [1]" |
| 146 | + end |
138 | 147 |
|
139 | 148 | it "notifies the delegate of errors for different build steps" do
|
140 | 149 | delegate.should_receive(:build_error_detected).with(
|
|
173 | 182 | translator << "Command /bin/sh failed with exit code 1"
|
174 | 183 | end
|
175 | 184 |
|
176 |
| - it "notifies the delegate of warnings" do |
| 185 | + it "notifies the delegate of warnings on < Xcode 4.3.2" do |
177 | 186 | delegate.should_receive(:build_warning_detected).with(
|
178 | 187 | :file => "/ExampleProject/main.m",
|
179 | 188 | :line => 16,
|
|
184 | 193 | translator << "/ExampleProject/main.m:16:42: warning: 'foo:' is deprecated"
|
185 | 194 | translator << "1 warning generated."
|
186 | 195 | end
|
| 196 | + |
| 197 | + it "notifies the delegate of warnings on >= Xcode 4.3.2" do |
| 198 | + delegate.should_receive(:build_warning_detected).with( |
| 199 | + :file => "/ExampleProject/main.m", |
| 200 | + :line => 16, |
| 201 | + :char => 42, |
| 202 | + :message => "'foo:' is deprecated" |
| 203 | + ) |
| 204 | + translator << "CompileC ExampleProject/main.m normal" |
| 205 | + translator << "/ExampleProject/main.m:16:42:something: warning: 'foo:' is deprecated" |
| 206 | + translator << "1 warning generated." |
| 207 | + end |
187 | 208 |
|
188 | 209 | it "treats :build_error_detected as an optional delegate message" do
|
189 | 210 | delegate_should_not_respond_to(:build_error_detected)
|
|
0 commit comments