org.scalatest.verb

class StringVerbBlockRegistration

[source: org/scalatest/verb/StringVerbBlockRegistration.scala]

abstract class StringVerbBlockRegistration
extends (java.lang.String, java.lang.String, () => Unit) => Unit
Class that provides a role-specific type for an implicit conversion used to support the registration of subject descriptions in WordSpec and FixtureWordSpec.

For example, this class enables syntax such as the following in WordSpec and FixtureWordSpec:

 "A Stack (when empty)" should { ...
                        ^
 
This should method, which is provided in ShouldVerb, needs an implicit parameter of type (String, String, () => Unit) => Unit. Because the required type has no ScalaTest-specific types in it, it is possible that another implicit parameter of that same type could be in scope, which would cause a compile failure. Requiring an implicit parameter of the more specific StringVerbBlockRegistration, which simply extends the needed type, (String, String, () => Unit) => Unit, avoids this potential conflict.
Author
Bill Venners
Method Summary
abstract def apply (string : java.lang.String, verb : java.lang.String, block : () => Unit) : Unit
Registers a subject description in WordSpec and FixtureWordSpec.
Methods inherited from scala.Function3
scala.Function3.toString, scala.Function3.curry
Methods inherited from AnyRef
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
abstract def apply(string : java.lang.String, verb : java.lang.String, block : () => Unit) : Unit
Registers a subject description in WordSpec and FixtureWordSpec.

For example, this class enables syntax such as the following in WordSpec and FixtureWordSpec:

   "A Stack (when empty)" should { ...
                          ^
   
Overrides
scala.Function3.scala.Function3.apply


Copyright (C) 2001-2009 Artima, Inc. All rights reserved.