@@ -236,9 +236,8 @@ class IdiomaticStubbingTest extends AnyWordSpec with Matchers with ArgumentMatch
236
236
237
237
org.doSomethingWithThisIntAndStringAndBoolean(1 , " 2" , v3 = false )
238
238
239
- an[IllegalArgumentException ] should be thrownBy {
240
- org.doSomethingWithThisIntAndStringAndBoolean(1 , " 2" , v3 = true )
241
- }
239
+ an[IllegalArgumentException ] should be thrownBy
240
+ org.doSomethingWithThisIntAndStringAndBoolean(1 , " 2" , v3 = true )
242
241
243
242
""" "some value" willBe thrown by org.bar""" shouldNot compile
244
243
}
@@ -258,9 +257,8 @@ class IdiomaticStubbingTest extends AnyWordSpec with Matchers with ArgumentMatch
258
257
aSpy.iBlowUp(1 , " ok" ) shouldBe " mocked!"
259
258
aSpy.iBlowUp(2 , " ok" ) shouldBe " mocked!"
260
259
261
- an[IllegalArgumentException ] should be thrownBy {
262
- aSpy.iBlowUp(2 , " not ok" )
263
- }
260
+ an[IllegalArgumentException ] should be thrownBy
261
+ aSpy.iBlowUp(2 , " not ok" )
264
262
}
265
263
266
264
" stub a function with an answer" in {
@@ -316,12 +314,11 @@ class IdiomaticStubbingTest extends AnyWordSpec with Matchers with ArgumentMatch
316
314
}
317
315
318
316
" be thread safe" when {
319
- " always stubbing object methods" in {
320
- immutable.ParSeq .range(1 , 100 ).foreach { i =>
321
- withObjectSpied[FooObject .type ] {
322
- FooObject .simpleMethod returns s " spied!- $i"
323
- FooObject .simpleMethod shouldBe s " spied!- $i"
324
- }
317
+ " always stubbing object methods" in
318
+ immutable.ParSeq .range(1 , 100 ).foreach { i =>
319
+ withObjectSpied[FooObject .type ] {
320
+ FooObject .simpleMethod returns s " spied!- $i"
321
+ FooObject .simpleMethod shouldBe s " spied!- $i"
325
322
}
326
323
}
327
324
@@ -357,12 +354,11 @@ class IdiomaticStubbingTest extends AnyWordSpec with Matchers with ArgumentMatch
357
354
FooObject .simpleMethod shouldBe " not mocked!"
358
355
}
359
356
360
- " object stubbing should be thread safe" in {
361
- immutable.ParSeq .range(1 , 100 ).foreach { i =>
362
- withObjectMocked[FooObject .type ] {
363
- FooObject .simpleMethod returns s " mocked!- $i"
364
- FooObject .simpleMethod shouldBe s " mocked!- $i"
365
- }
357
+ " object stubbing should be thread safe" in
358
+ immutable.ParSeq .range(1 , 100 ).foreach { i =>
359
+ withObjectMocked[FooObject .type ] {
360
+ FooObject .simpleMethod returns s " mocked!- $i"
361
+ FooObject .simpleMethod shouldBe s " mocked!- $i"
366
362
}
367
363
}
368
364
0 commit comments