How to programmatically ignore/skip tests with ScalaTest?
问题 I am running some tests with ScalaTest which rely on connections to test servers to be present. I currently created my own Spec similar to this: abstract class ServerDependingSpec extends FlatSpec with Matchers { def serverIsAvailable: Boolean = { // Check if the server is available } } Is it possible to ignore (but not fail) tests when this method returns false ? Currently I do it in a "hackish" way: "Something" should "do something" in { if(serverIsAvailable) { // my test code } } but I