Hi Seyi,
Thanks for posting your examples and output.
I suggest the following:
- if you have issues with examples being executed concurrently you can try to use the `sequential` argument at the beginning of the specification
class DatabaseSpec extends Specification { def is = sequential ^
"This is a specification to check the database schema" ^
However in your case it might be something entirely different because of the way Squeryl works. Maybe there's something smarter to do by attaching the database session to the current thread as suggested so that you can still have your examples being executed concurrently.
- For the second example you can avoid the implicits clash by using the `>>` operator:
"Schema stored in database should" >> {
"allow creation of new entries" >> {
val datum = data.insert(new AppData(0, Some(1),Some(""), Some("ftp.example.org"), Some("username"), Some("password"), Some(new java.util.Date))) datum.id must_== 1
}
Also, in that second example, if you create a `Before` context object, you need to `apply` it to your example body:
"allow creation of new entries" >> setupData {
val datum = data.insert(new AppData(0, Some(1),Some(""), Some("ftp.example.org"), Some("username"), Some("password"), Some(new java.util.Date))) datum.id must_== 1
}
But the easiest thing to do is to use the
BeforeExample trait in that case.
I hope that'll get you started.