@@ -236,9 +236,8 @@ class IdiomaticStubbingTest extends AnyWordSpec with Matchers with ArgumentMatch
236236
237237 org.doSomethingWithThisIntAndStringAndBoolean(1 , " 2" , v3 = false )
238238
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 )
242241
243242 """ "some value" willBe thrown by org.bar""" shouldNot compile
244243 }
@@ -258,9 +257,8 @@ class IdiomaticStubbingTest extends AnyWordSpec with Matchers with ArgumentMatch
258257 aSpy.iBlowUp(1 , " ok" ) shouldBe " mocked!"
259258 aSpy.iBlowUp(2 , " ok" ) shouldBe " mocked!"
260259
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" )
264262 }
265263
266264 " stub a function with an answer" in {
@@ -316,12 +314,11 @@ class IdiomaticStubbingTest extends AnyWordSpec with Matchers with ArgumentMatch
316314 }
317315
318316 " 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"
325322 }
326323 }
327324
@@ -357,12 +354,11 @@ class IdiomaticStubbingTest extends AnyWordSpec with Matchers with ArgumentMatch
357354 FooObject .simpleMethod shouldBe " not mocked!"
358355 }
359356
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"
366362 }
367363 }
368364
0 commit comments