Many of my tests are dependent on the database. I use the following to check the connection before running the test case:
assume(database.isAvailable, "Database is down")
When I add it to each test case, the correct !!! CANCELED !!!
with the correct message is displayed in the output.
When I add it to the beforeEach
method:
override def beforeEach() = {
assume(database.isAvailable, "Database is down")
}
all I can see is just Exception encountered when attempting to run a suite with class name
and *** ABORTED ***
(on the line with the assume
call).
Do I really need to add this assumption to each testcase?