@@ -46,6 +46,7 @@ module Cucumber::Core::Test
46
46
specify { expect ( result ) . not_to be_undefined }
47
47
specify { expect ( result ) . not_to be_unknown }
48
48
specify { expect ( result ) . not_to be_skipped }
49
+ specify { expect ( result ) . not_to be_flaky }
49
50
50
51
specify { expect ( result ) . to be_ok }
51
52
specify { expect ( result . ok? ( false ) ) . to be_truthy }
@@ -105,6 +106,7 @@ module Cucumber::Core::Test
105
106
specify { expect ( result ) . not_to be_undefined }
106
107
specify { expect ( result ) . not_to be_unknown }
107
108
specify { expect ( result ) . not_to be_skipped }
109
+ specify { expect ( result ) . not_to be_flaky }
108
110
109
111
specify { expect ( result ) . to_not be_ok }
110
112
specify { expect ( result . ok? ( false ) ) . to be_falsey }
@@ -130,6 +132,7 @@ module Cucumber::Core::Test
130
132
specify { expect ( result ) . not_to be_undefined }
131
133
specify { expect ( result ) . to be_unknown }
132
134
specify { expect ( result ) . not_to be_skipped }
135
+ specify { expect ( result ) . not_to be_flaky }
133
136
end
134
137
135
138
describe Result ::Raisable do
@@ -196,6 +199,7 @@ module Cucumber::Core::Test
196
199
specify { expect ( result ) . to be_undefined }
197
200
specify { expect ( result ) . not_to be_unknown }
198
201
specify { expect ( result ) . not_to be_skipped }
202
+ specify { expect ( result ) . not_to be_flaky }
199
203
200
204
specify { expect ( result ) . to be_ok }
201
205
specify { expect ( result . ok? ( false ) ) . to be_truthy }
@@ -218,6 +222,7 @@ module Cucumber::Core::Test
218
222
specify { expect ( result ) . not_to be_undefined }
219
223
specify { expect ( result ) . not_to be_unknown }
220
224
specify { expect ( result ) . to be_skipped }
225
+ specify { expect ( result ) . not_to be_flaky }
221
226
222
227
specify { expect ( result ) . to be_ok }
223
228
specify { expect ( result . ok? ( false ) ) . to be_truthy }
@@ -240,13 +245,19 @@ module Cucumber::Core::Test
240
245
specify { expect ( result ) . not_to be_undefined }
241
246
specify { expect ( result ) . not_to be_unknown }
242
247
specify { expect ( result ) . not_to be_skipped }
248
+ specify { expect ( result ) . not_to be_flaky }
243
249
specify { expect ( result ) . to be_pending }
244
250
245
251
specify { expect ( result ) . to be_ok }
246
252
specify { expect ( result . ok? ( false ) ) . to be_truthy }
247
253
specify { expect ( result . ok? ( true ) ) . to be_falsey }
248
254
end
249
255
256
+ describe Result ::Flaky do
257
+ specify { expect ( Result ::Flaky . ok? ( false ) ) . to be_truthy }
258
+ specify { expect ( Result ::Flaky . ok? ( true ) ) . to be_falsey }
259
+ end
260
+
250
261
describe Result ::Summary do
251
262
let ( :summary ) { Result ::Summary . new }
252
263
let ( :failed ) { Result ::Failed . new ( Result ::Duration . new ( 10 ) , exception ) }
@@ -357,6 +368,12 @@ def describe_to(visitor, *args)
357
368
expect ( summary . ok? ) . to be true
358
369
expect ( summary . ok? ( true ) ) . to be false
359
370
end
371
+
372
+ it "flaky result is ok if not strict" do
373
+ summary . flaky
374
+ expect ( summary . ok? ) . to be true
375
+ expect ( summary . ok? ( true ) ) . to be false
376
+ end
360
377
end
361
378
end
362
379
0 commit comments