scala - Stacktraces on user instantiated exceptions in Specs2 output -


in our tests, make extensive use of stubs, of create , throw exceptions. i'm finding instantiating exception, causing stacktrace show when our tests run. means there's large amount of unnecessary , confusing noise, don't care these 'expected' exceptions. i've scoured internet, can't find silencing these stacktraces (bare in mind, actual exceptions, thrown elsewhere within code, or framework, i'd still show traces for). common issue , has found way around it?

sorry, example:

val t = new throwable("expected exception") val service = new authenticationservice()(exceptionthrowingclient(t)) 

results in test run stacktrace looks this:

java.lang.throwable: expected exception @ services.auth.authenticationservicespec$$anonfun$4.apply(servicespec.scala:104) ~[test-classes/:na] @ services.auth.authenticationservicespec$$anonfun$4.apply(servicespec.scala:103) ~[test-classes/:na] @ org.specs2.mutable.sideeffectingcreationpaths$$anonfun$executeblock$1.apply$mcv$sp(fragmentsbuilder.scala:292) ~[specs2-core_2.10-2.3.12.jar:2.3.12] @ org.specs2.mutable.sideeffectingcreationpaths$class.replay(fragmentsbuilder.scala:264) ~[specs2-core_2.10-2.3.12.jar:2.3.12] @ org.specs2.mutable.specification.replay(specification.scala:12) ~[specs2-core_2.10-2.3.12.jar:2.3.12] 

which traces point of instantiation within spec.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -