SpecificationFeatures
List of all the features which are being included the default Specification class:
- matchers (with the expectations dsl and the most common matchers)
- standard results
- pending until fixed
- implicit parameters to overload some method calls
- .pp calls to print out some expressions
Type members
Inherited classlikes
Exception matcher checking the type of a thrown exception.
Exception matcher checking the type of a thrown exception.
- Inherited from
- ExceptionMatchers
This matchers matches exception instances.
This matchers matches exception instances.
- See also
throwA
- Inherited from
- ExceptionMatchers
Matcher to find if the regexp a is found inside b. This matcher can be specialized to a FindMatcherWithGroups which will also check the found groups
Matcher to find if the regexp a is found inside b. This matcher can be specialized to a FindMatcherWithGroups which will also check the found groups
- Inherited from
- StringMatchers
Matcher to find if the pattern p is found inside b.
Matcher to find if the pattern p is found inside b.
- Inherited from
- StringMatchers
Matcher to find if the pattern p is found inside b.
Matcher to find if the pattern p is found inside b.
- Inherited from
- StringMatchers
Matcher to find if the Regex r is found inside b.
Matcher to find if the Regex r is found inside b.
- Inherited from
- StringMatchers
Matcher to find if the regexp a is found inside b. This matcher checks if the found groups are really the ones expected
Matcher to find if the regexp a is found inside b. This matcher checks if the found groups are really the ones expected
- Inherited from
- StringMatchers
Value members
Inherited methods
matches if a.toLowerCase.trim != b.toLowerCase.trim
matches if a.toLowerCase.trim != b.toLowerCase.trim
- Inherited from
- StringMatchers
matches if a.toLowerCase.trim = b.toLowerCase.trim
matches if a.toLowerCase.trim = b.toLowerCase.trim
- Inherited from
- StringMatchers
matches if a == b after an implicit conversion
matches if a == b after an implicit conversion
- Inherited from
- AnyMatchers
alias for beMatching but matching just a fragment of the string
alias for beMatching but matching just a fragment of the string
- Inherited from
- StringMatchers
alias for beOneOf, which can be used with contain matchers
alias for beOneOf, which can be used with contain matchers
- Inherited from
- AnyMatchers
verify the function f for at least one value, where the PartialFunction is defined
verify the function f for at least one value, where the PartialFunction is defined
- Inherited from
- MatcherImplicits
verify the function f for at least one value, where the PartialFunction is defined
verify the function f for at least one value, where the PartialFunction is defined
- Inherited from
- MatcherImplicits
- Inherited from
- FutureMatchers
matches if a is null when v is null and a is not null when v is not null
matches if a is null when v is null and a is not null when v is not null
- Inherited from
- AnyMatchers
matches if a value is between 2 others according to an Ordering
matches if a value is between 2 others according to an Ordering
- Inherited from
- NumericMatchers
matches if target - actual < 10 pow (log actual - significantDigits)
matches if target - actual < 10 pow (log actual - significantDigits)
- Inherited from
- NumericMatchers
matches if the partial function is defined at those values
matches if the partial function is defined at those values
- Inherited from
- MapMatchers
matches if the partial function is defined at those values and return expected values
matches if the partial function is defined at those values and return expected values
- Inherited from
- MapMatchers
check if a Throwable has a specific class and error message The message must be a regular expression, for example (new IllegalArgumentException("incorrect arguments"): Throwable) must beExceptionIllegalArgumentException
check if a Throwable has a specific class and error message The message must be a regular expression, for example (new IllegalArgumentException("incorrect arguments"): Throwable) must beExceptionIllegalArgumentException
- Inherited from
- ExceptionMatchers
matches if the value returns a successful result when applied to a PartialFunction
matches if the value returns a successful result when applied to a PartialFunction
- Inherited from
- AnyMatchers
matches if b matches the regular expression a
matches if b matches the regular expression a
- Inherited from
- StringMatchers
alias for beMatching but matching just a fragment of the string
alias for beMatching but matching just a fragment of the string
- Inherited from
- StringMatchers
matches if a.toLowerCase.trim != b.toLowerCase.trim
matches if a.toLowerCase.trim != b.toLowerCase.trim
- Inherited from
- StringMatchers
matches if a.toLowerCase.trim = b.toLowerCase.trim
matches if a.toLowerCase.trim = b.toLowerCase.trim
- Inherited from
- StringMatchers
matches if a == b after an implicit conversion
matches if a == b after an implicit conversion
- Inherited from
- AnyMatchers
this method can be overridden to throw exceptions when checking a result
this method can be overridden to throw exceptions when checking a result
- Inherited from
- ResultChecks
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
- Inherited from
- TraversableBaseMatchers
Additional contain methods using to avoid automatic tuple conversions
Additional contain methods using to avoid automatic tuple conversions
- Inherited from
- TraversableBaseMatchers
match if a traversable contains all the elements of seq (and maybe more)
match if a traversable contains all the elements of seq (and maybe more)
- Inherited from
- TraversableBaseMatchers
match if a traversable contains one of (t1, t2)
match if a traversable contains one of (t1, t2)
- Inherited from
- TraversableBaseMatchers
match if traversable contains (x matches .+t+.)
match if traversable contains (x matches .+t+.)
- Inherited from
- TraversableBaseMatchers
match if traversable contains (x matches p)
match if traversable contains (x matches p)
- Inherited from
- TraversableBaseMatchers
does a containAll comparison in both ways
does a containAll comparison in both ways
- Inherited from
- TraversableBaseMatchers
- Returns
a matcher that will retry the nested matcher a given number of times
- Inherited from
- EventuallyMatchers
- Value Params
- sleep
the function applied on the retry number (first is 1)
- Returns
a matcher that will retry the nested matcher a given number of times
- Inherited from
- EventuallyMatchers
- Returns
a matcher that will retry the nested matcher a given number of times
- Inherited from
- EventuallyResults
- Value Params
- sleep
the function applied on the retry number (first is 1)
- Returns
a matcher that will retry the nested matcher a given number of times
eventually(retries = 2, sleep = _ * 100.milliseconds) { aResult }
- Inherited from
- EventuallyResults
matches if the regexp r is found inside b
matches if the regexp r is found inside b
- Inherited from
- StringMatchers
matches if the pattern p is found inside b
matches if the pattern p is found inside b
- Inherited from
- StringMatchers
matches if the regexp a is found inside b
matches if the regexp a is found inside b
- Inherited from
- StringMatchers
verify the function f for all the values, stopping after the first failure, where the PartialFunction is defined
verify the function f for all the values, stopping after the first failure, where the PartialFunction is defined
- Inherited from
- MatcherImplicits
- Inherited from
- MatcherImplicits
verify the function f for all the values, and collect all failures
verify the function f for all the values, and collect all failures
- Inherited from
- MatcherImplicits
verify the function f for all the values, and collect all failures, where the PartialFunction is defined
verify the function f for all the values, and collect all failures, where the PartialFunction is defined
- Inherited from
- MatcherImplicits
matches if x.getClass.getInterfaces.contains(T)
matches if x.getClass.getInterfaces.contains(T)
- Inherited from
- AnyMatchers
matches if map.contains(k) forall key k
matches if map.contains(k) forall key k
- Inherited from
- MapMatchers
matches if map contains a pair (key, value) == (k, v)
matches if map contains a pair (key, value) == (k, v)
- Inherited from
- MapMatchers
matches if map contains all the specified pairs
matches if map contains all the specified pairs
- Inherited from
- MapMatchers
match if there is a way to size T
match if there is a way to size T
- Inherited from
- TraversableBaseMatchers
match if there is a way to size T
match if there is a way to size T
- Inherited from
- TraversableBaseMatchers
matches if c.isAssignableFrom(v.getClass.getSuperclass)
matches if c.isAssignableFrom(v.getClass.getSuperclass)
- Inherited from
- AnyMatchers
matches if map contains a pair (key, value) with value == v
matches if map contains a pair (key, value) with value == v
- Inherited from
- MapMatchers
matches if map contains a pair (key, value) with value == v for all value v
matches if map contains a pair (key, value) with value == v for all value v
- Inherited from
- MapMatchers
this method can be overridden to intercept a Result and modify it. It is used for example to set a stacktrace providing the location of a failure
this method can be overridden to intercept a Result and modify it. It is used for example to set a stacktrace providing the location of a failure
- Inherited from
- ResultChecks
this method can be overridden to avoid filling-in a stacktrace indicating the location of the result
this method can be overridden to avoid filling-in a stacktrace indicating the location of the result
- Inherited from
- MatchResultStackTrace
- Returns
a matcher checking the type of an Exception and its message (as a regexp)
- Inherited from
- ExceptionMatchers
an expected value can be used to check another value
an expected value can be used to check another value
- Inherited from
- ValueChecksBase
Inherited fields
Givens
Inherited givens
implicit definition to create delta for the beCloseTo matcher
implicit definition to create delta for the beCloseTo matcher
- Inherited from
- NumericMatchers
a check of type T can be downcasted implicitly to a check of type S >: T
a check of type T can be downcasted implicitly to a check of type S >: T
- Inherited from
- ValueChecks
if an implicit execution environment is in scope, it can be used as an execution context
if an implicit execution environment is in scope, it can be used as an execution context
- Inherited from
- ImplicitExecutionContextFromExecutionEnv
a function returning an object having an AsResult instance can check a value
a function returning an object having an AsResult instance can check a value
- Inherited from
- ValueChecksLowImplicits
implicit definition to accept any boolean value as a Result This avoids writing b must beTrue
implicit definition to accept any boolean value as a Result This avoids writing b must beTrue
- Inherited from
- Results
a partial function returning an object having an AsResult instance can check a value
a partial function returning an object having an AsResult instance can check a value
- Inherited from
- ValueChecks
Extensions
Inherited extensions
- Inherited from
- ExpectationsDescription
- Inherited from
- ExpectationsDescription
this extension provides an inverted syntax to adapt matchers to make the adaptation more readable in some cases:
this extension provides an inverted syntax to adapt matchers to make the adaptation more readable in some cases:
- def haveExtension(extension: =>String) = ((_:File).getPath) ^^ endWith(extension)
- Inherited from
- MatcherImplicits
add an await
method to any matcher Matcher[T]
so that it can be transformed into a Matcher[Future[T]] making this implicit an extension method does not work out of the box
add an await
method to any matcher Matcher[T]
so that it can be transformed into a Matcher[Future[T]] making this implicit an extension method does not work out of the box
- Inherited from
- FutureMatchers
add an await
method to any matcher Matcher[T]
so that it can be transformed into a Matcher[Future[T]] making this implicit an extension method does not work out of the box
add an await
method to any matcher Matcher[T]
so that it can be transformed into a Matcher[Future[T]] making this implicit an extension method does not work out of the box
- Inherited from
- FutureMatchers
add an await
method to any matcher Matcher[T]
so that it can be transformed into a Matcher[Future[T]] making this implicit an extension method does not work out of the box
add an await
method to any matcher Matcher[T]
so that it can be transformed into a Matcher[Future[T]] making this implicit an extension method does not work out of the box
- Inherited from
- FutureMatchers
add an await
method to any matcher Matcher[T]
so that it can be transformed into a Matcher[Future[T]] making this implicit an extension method does not work out of the box
add an await
method to any matcher Matcher[T]
so that it can be transformed into a Matcher[Future[T]] making this implicit an extension method does not work out of the box
- Inherited from
- FutureMatchers
adapt the BeEqualTo matcher to provide ignoreCase and ignoreSpace matcher
adapt the BeEqualTo matcher to provide ignoreCase and ignoreSpace matcher
- Inherited from
- StringMatchers
adapt the BeEqualTo matcher to provide ignoreCase and ignoreSpace matcher
adapt the BeEqualTo matcher to provide ignoreCase and ignoreSpace matcher
- Inherited from
- StringMatchers
print the object to the console with a small message before
print the object to the console with a small message before
- Inherited from
- Debug
print the object to the console with a specific function and return it
print the object to the console with a specific function and return it
- Inherited from
- Debug
print the object to the console and return it, if the condition is satisfied
print the object to the console and return it, if the condition is satisfied
- Inherited from
- Debug
print the object to the console and return it, if the condition is satisfied
print the object to the console and return it, if the condition is satisfied
- Inherited from
- Debug
- Returns
Pending unless the result is a success
- Inherited from
- PendingUntilFixed
- Returns
Pending unless the result is a success
- Inherited from
- PendingUntilFixed
- Returns
an expectable with its toString method as an alias description this is useful to preserve the original value when the matcher using it is adapting the value
- Inherited from
- ExpectationsDescription
- Returns
an expectable with an alias description, after the value string
- Inherited from
- ExpectationsDescription
- Returns
an expectable with an alias description, after the value string
- Inherited from
- ExpectationsDescription
- Returns
an expectable with a function to show the element T
- Inherited from
- ExpectationsDescription
implicit definition to create significant figures for the beCloseTo matcher
implicit definition to create significant figures for the beCloseTo matcher
- Inherited from
- NumericMatchers
Extend collections to check all their elements
Extend collections to check all their elements
- Inherited from
- MatcherImplicits
Extend collections to check all their elements
Extend collections to check all their elements
- Inherited from
- MatcherImplicits
Extend collections to check all their elements
Extend collections to check all their elements
- Inherited from
- MatcherImplicits
Extend collections to check all their elements
Extend collections to check all their elements
- Inherited from
- MatcherImplicits
Extend collections to check all their elements
Extend collections to check all their elements
- Inherited from
- MatcherImplicits
Extend collections to check all their elements
Extend collections to check all their elements
- Inherited from
- MatcherImplicits
Extend collections to check all their elements
Extend collections to check all their elements
- Inherited from
- MatcherImplicits
Extend collections to check all their elements
Extend collections to check all their elements
- Inherited from
- MatcherImplicits
Extend collections to check all their elements
Extend collections to check all their elements
- Inherited from
- MatcherImplicits
Implicits
Inherited implicits
- Inherited from
- ShouldExpectations
when a Future contains a result, it can be awaited to return this result
when a Future contains a result, it can be awaited to return this result
- Inherited from
- FutureMatchers