I'm working on a customer-readable DSL for ScalaTest. At the moment I can write
feature("Admin Login") {
scenario("Correct username and password") {
given("user visits", classOf[AdminHomePage])
then(classOf[SignInPage], "is displayed")
but this would read a lot better as
feature("Admin Login") {
scenario("Correct username and password") {
given("user visits", the[AdminHomePage])
then(the[SignInPage], "is displayed")
Is there any way to
def the[T] =
to return classOf[T]
?