@@ -1345,9 +1345,9 @@ def extract_execution_results(group)
1345
1345
1346
1346
context "with fail_fast and failures_required == 1" do
1347
1347
let ( :group ) do
1348
- the_group = RSpec . describe
1349
- allow ( the_group ) . to receive ( :fail_fast? ) { true }
1350
- the_group
1348
+ group = RSpec . describe
1349
+ allow ( group ) . to receive ( :fail_fast? ) { true }
1350
+ group
1351
1351
end
1352
1352
let ( :config ) { Configuration . new }
1353
1353
let ( :reporter ) do
@@ -1358,28 +1358,28 @@ def extract_execution_results(group)
1358
1358
1359
1359
it "does not run examples after the failed example" do
1360
1360
examples_run = [ ]
1361
- self . group . example ( 'example 1' ) { examples_run << self }
1362
- self . group . example ( 'example 2' ) { examples_run << self ; fail ; }
1363
- self . group . example ( 'example 3' ) { examples_run << self }
1361
+ group ( ) . example ( 'example 1' ) { examples_run << self }
1362
+ group ( ) . example ( 'example 2' ) { examples_run << self ; fail ; }
1363
+ group ( ) . example ( 'example 3' ) { examples_run << self }
1364
1364
1365
- self . group . run ( reporter )
1365
+ group ( ) . run ( reporter )
1366
1366
1367
1367
expect ( examples_run . length ) . to eq ( 2 )
1368
1368
end
1369
1369
1370
1370
it "sets RSpec.world.wants_to_quit flag if encountering an exception in before(:all)" do
1371
- self . group . before ( :all ) { raise "error in before all" }
1372
- self . group . example ( "equality" ) { expect ( 1 ) . to eq ( 2 ) }
1373
- expect ( self . group . run ) . to be_falsey
1371
+ group ( ) . before ( :all ) { raise "error in before all" }
1372
+ group ( ) . example ( "equality" ) { expect ( 1 ) . to eq ( 2 ) }
1373
+ expect ( group ( ) . run ) . to be_falsey
1374
1374
expect ( RSpec . world . wants_to_quit ) . to be_truthy
1375
1375
end
1376
1376
end
1377
1377
1378
1378
context "with fail_fast and failures_required = 3" do
1379
1379
let ( :group ) do
1380
- the_group = RSpec . describe
1381
- allow ( the_group ) . to receive ( :fail_fast? ) { true }
1382
- the_group
1380
+ group = RSpec . describe
1381
+ allow ( group ) . to receive ( :fail_fast? ) { true }
1382
+ group
1383
1383
end
1384
1384
let ( :config ) { Configuration . new }
1385
1385
@@ -1391,21 +1391,21 @@ def extract_execution_results(group)
1391
1391
1392
1392
it "does not run examples after 3 failed examples" do
1393
1393
examples_run = [ ]
1394
- self . group . example ( 'example 1' ) { examples_run << self }
1395
- self . group . example ( 'example 2' ) { examples_run << self ; fail ; }
1396
- self . group . example ( 'example 3' ) { examples_run << self ; fail ; }
1397
- self . group . example ( 'example 4' ) { examples_run << self ; fail ; }
1398
- self . group . example ( 'example 5' ) { examples_run << self }
1394
+ group ( ) . example ( 'example 1' ) { examples_run << self }
1395
+ group ( ) . example ( 'example 2' ) { examples_run << self ; fail ; }
1396
+ group ( ) . example ( 'example 3' ) { examples_run << self ; fail ; }
1397
+ group ( ) . example ( 'example 4' ) { examples_run << self ; fail ; }
1398
+ group ( ) . example ( 'example 5' ) { examples_run << self }
1399
1399
1400
- self . group . run ( reporter )
1400
+ group ( ) . run ( reporter )
1401
1401
1402
1402
expect ( examples_run . length ) . to eq ( 4 )
1403
1403
end
1404
1404
1405
1405
it "sets RSpec.world.wants_to_quit flag if encountering an exception in before(:all)" do
1406
- self . group . before ( :all ) { raise "error in before all" }
1407
- self . group . example ( "equality" ) { expect ( 1 ) . to eq ( 2 ) }
1408
- expect ( self . group . run ) . to be_falsey
1406
+ group ( ) . before ( :all ) { raise "error in before all" }
1407
+ group ( ) . example ( "equality" ) { expect ( 1 ) . to eq ( 2 ) }
1408
+ expect ( group ( ) . run ) . to be_falsey
1409
1409
expect ( RSpec . world . wants_to_quit ) . to be_truthy
1410
1410
end
1411
1411
end
@@ -1421,7 +1421,7 @@ def extract_execution_results(group)
1421
1421
1422
1422
it "returns without starting the group" do
1423
1423
expect ( reporter ) . not_to receive ( :example_group_started )
1424
- self . group . run ( reporter )
1424
+ group ( ) . run ( reporter )
1425
1425
end
1426
1426
end
1427
1427
0 commit comments