this implicit provides an inverted syntax to adapt matchers to make the adaptation more readable in some cases: - def haveExtension(extension: =>String) = ((_:File).
This class is especially created when the first fragment of a specification is a boolean result (no text before) The startDepth and offsets are special tweakings to make sure we get the right line in that specific case
This class is especially created when the first fragment of a specification is a boolean result (no text before) The startDepth and offsets are special tweakings to make sure we get the right line in that specific case
transient class to hold an example description before creating a full Example
Exception matcher checking the type of a thrown exception.
Exception matcher checking the type of a thrown exception.
This matchers matches exception instances.
This matchers matches exception instances.
throwA
Matcher to find if the regexp a is found inside b.
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 pattern p is found inside b.
Matcher to find if the pattern p is found inside b.
Matcher to find if the pattern p is found inside b.
Matcher to find if the pattern p is found inside b.
Matcher to find if the Regex r is found inside b.
Matcher to find if the Regex r is found inside b.
Matcher to find if the regexp a is found inside b.
Matcher to find if the regexp a is found inside b. This matcher checks if the found groups are really the ones expected
add an await
method to any matcher Matcher[T]
so that it can be transformed into a Matcher[Future[T]]
transient class to hold an example description before creating a full Example
This class is especially created when the first fragment of a specification is a match result (no text before) The startDepth and offsets are special tweakings to make sure we get the right line in that specific case
This class is especially created when the first fragment of a specification is a match result (no text before) The startDepth and offsets are special tweakings to make sure we get the right line in that specific case
This class is especially created when the first fragment of a specification is a Result (no text before) The startDepth and offsets are special tweakings to make sure we get the right line in that specific case
This class is especially created when the first fragment of a specification is a Result (no text before) The startDepth and offsets are special tweakings to make sure we get the right line in that specific case
The SeqMatcher
class is a matcher matching a sequence of objects with a matcher returned by a function.
The SetMatcher
class is a matcher matching a set of objects with a matcher returned by a function.
this syntax allows to declare auto examples with { .
this syntax allows to declare auto examples with { ... }.eg in mutable specifications
any block of code following a pending object will be pending
Add functionalities to functions returning matchers so that they can be combined before taking a value and returning actual matchers
any block of code following a skipped object will be skipped
matches if a.
matches if a.toLowerCase.trim != b.toLowerCase.trim
matches if a != b
matches if a != b
adding a conflicting implicit to warn the user when a >>
was forgotten
adding a conflicting implicit to warn the user when a >>
was forgotten
alias for beLessThan
alias for beLessThan
alias for beLessThanOrEqualTo
alias for beLessThanOrEqualTo
matches if a.
matches if a.toLowerCase.trim = b.toLowerCase.trim
matches if a == b
matches if a == b
matches if a == b after an implicit conversion
matches if a == b after an implicit conversion
alias for beMatching but matching just a fragment of the string
alias for beMatching but matching just a fragment of the string
alias for beMatching but matching just a fragment of the string
alias for beMatching but matching just a fragment of the string
alias for beMatching but matching just a fragment of the string
alias for beMatching but matching just a fragment of the string
alias for beGreaterThan
alias for beGreaterThan
alias for beGreaterThanOrEqualTo
alias for beGreaterThanOrEqualTo
implicit definition to create delta for the beCloseTo matcher
implicit definition to create delta for the beCloseTo matcher
this syntax allows to declare auto examples with { .
this syntax allows to declare auto examples with { ... }.eg in mutable specifications
add a new action to the Fragments
add a new action to the Fragments
add a tagging fragment to the specification
add a tagging fragment to the specification
shorthand method to create an Arguments object
shorthand method to create an Arguments object
Arguments creation
Arguments creation
a Fragments object which can be chained with other fragments
implicit definition to transform any MatchResult to a Result
implicit definition to transform any MatchResult to a Result
apply a matcher atLeast one value
apply a matcher atLeast one value
verify the function f for at least one value
verify the function f for at least one value
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
apply a matcher atLeast one value
apply a matcher atLeast one value
verify the function f for at least one value
verify the function f for at least one value
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
alias for beTheSameAs
alias for beTheSameAs
alias for beOneOf
alias for beOneOf
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
matches if v.
matches if v.isAssignableFrom(c)
matches if a value is between 2 others according to an Ordering
matches if a value is between 2 others according to an Ordering
matches if x = n +/- delta
matches if x = n +/- delta
matches if x = n +/- delta
matches if x = n +/- delta
matches if the partial function is defined at those values
matches if the partial function is defined at those values
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
matches if a.
matches if a.isEmpty
matches if a == b
matches if a == b
matches if a == false
matches if a == false
matches if x > n
matches if x > n
matches if x >= n
matches if x >= n
matches if x < n
matches if x < n
matches if x <= n
matches if x <= n
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
matches if b matches the regex a
matches if b matches the regex a
matches if b matches the pattern a
matches if b matches the pattern a
matches if b matches the regular expression a
matches if b matches the regular expression a
matches if the value is null
matches if the value is null
matches if t.
matches if t.toSeq.exists(_ == v)
a matcher checking if the elements are ordered
matches if a eq b
matches if a eq b
matches if a == true
matches if a == true
matches if a == b
matches if a == b
alias for the adventurous: 5 must (be[(2, 7)
[)
alias for the adventurous: 5 must (be[(2, 7)
[)
alias for the adventurous: 5 must (be](2, 7)
[)
alias for the adventurous: 5 must (be](2, 7)
[)
matches if a != b
matches if a != b
matches if a.
matches if a.toLowerCase.trim != b.toLowerCase.trim
matches if a != b
matches if a != b
alias for beLessThan
alias for beLessThan
alias for beLessThanOrEqualTo
alias for beLessThanOrEqualTo
matches if a == b
matches if a == b
matches if a.
matches if a.toLowerCase.trim = b.toLowerCase.trim
matches if a == b
matches if a == b
matches if a == b after an implicit conversion
matches if a == b after an implicit conversion
alias for beGreaterThan
alias for beGreaterThan
alias for beGreaterThanOrEqualTo
alias for beGreaterThanOrEqualTo
this implicit def is necessary when the expression is at the start of the spec
this implicit def is necessary when the expression is at the start of the spec
this implicit def is necessary when the expression is at the start of the spec
this implicit def is necessary when the expression is at the start of the spec
A value can be tested against another with the === operator.
A value can be tested against another with the === operator. It is equivalent to writing a must_== b
this method can be overriden to throw exceptions when checking the match result
this method can be overriden to throw exceptions when checking the match result
this method can be overriden to throw exceptions when checking the match result
this method can be overriden to throw exceptions when checking the match result
this method can be overriden to throw exceptions when checking the result
this method can be overriden to throw exceptions when checking the result
shortcut to set new Colors
shortcut to set new Colors
matches if (b contains a)
matches if (b contains a)
matches if (b contains a)
matches if (b contains a)
COLLECTION MATCHERS
COLLECTION MATCHERS
ELEMENTS MATCHERS
ELEMENTS MATCHERS
Additional contain methods using to avoid automatic tuple conversions
Additional contain methods using to avoid automatic tuple conversions
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)
match if a traversable contains one of (t1, t2)
match if a traversable contains one of (t1, t2)
match if traversable contains (x matches .
match if traversable contains (x matches .*+t+.*)
match if traversable contains (x matches p)
match if traversable contains (x matches p)
does a containAll comparison in both ways
does a containAll comparison in both ways
transform a context to a result to allow the implicit passing of a context to each example
transform a context to a result to allow the implicit passing of a context to each example
an Expectable with a description function
an Expectable with a description function
an Expectable with a description
an Expectable
an Expectable with a function to show the element T
specific implicits for datatables
specific implicits for datatables
shortcut to display the example descriptions from the expectations ok messages
shortcut to display the example descriptions from the expectations ok messages
describe a value with the aka method
describe a value with the aka method
shortcut to display the differences with some specific parameters
shortcut to display the differences with some specific parameters
add an after action to any kind of result
add an after action to any kind of result
add an Around function to any kind of result
add an Around function to any kind of result
add a before action to any kind of result
add a before action to any kind of result
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
explicit call
explicit call
explicit call The result type is different from the eg method to create examples in order to avoid an overloading error
explicit call The result type is different from the eg method to create examples in order to avoid an overloading error
explicit call.
explicit call. The result type is different from the eg method to create examples in order to avoid an overloading error
explicit call
explicit call
matches if b.
matches if b.endsWith(a)
matches if a == b
matches if a == b
a matcher that will retry the nested matcher 40 times
a matcher that will retry the nested matcher a given number of times
a result that is retried at least 40 times until it's ok
a matcher that will retry the nested matcher a given number of times
add a block of examples
add a block of examples
shortcut to exclude some tagged fragments
shortcut to exclude some tagged fragments
shortcut to add exclude trace patterns
shortcut to add exclude trace patterns
shortcut to create a stackTrace filter to exclude only some elements
shortcut to create a stackTrace filter to exclude only some elements
matches if the regexp r is found inside b
matches if the regexp r is found inside b
matches if the pattern p is found inside b
matches if the pattern p is found inside b
matches if the regexp a is found inside b
matches if the regexp a is found inside b
apply an implicit Fixture
apply an implicit Fixture
Example creation
Example creation
an Example description from a string, to create a full Example once the body is defined
apply a matcher for all values
apply a matcher for all values
verify the function f for all the values, stopping after the first failure
verify the function f for all the values, stopping after the first failure
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
apply a matcher foreach value
apply a matcher foreach value
verify the function f for all the values, and collect all failures
verify the function f for all the values, and collect all failures
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
format a list of fragments according to their formatting tags
format a list of fragments according to their formatting tags
add a tagging section with special tag names specifying the formatting options
add a tagging section with special tag names specifying the formatting options
add a tag with special tag names specifying the formatting options
add a tag with special tag names specifying the formatting options
This implicit allows to follow a fragment by a Formatting fragment
This implicit allows to follow a fragment by a Formatting fragment
This implicit allows to add tags and sections _after_ the examples
This implicit allows to add tags and sections _after_ the examples
a Fragments object from a single Fragment
This implicit allows to follow a Fragments object by a Formatting fragment
This implicit allows to follow a Fragments object by a Formatting fragment
This implicit allows to follow a FragmentsFragment object by a Formatting fragment
This implicit allows to follow a FragmentsFragment object by a Formatting fragment
reverse conversion from a Fragment containing a Fragments object to the Fragments object
reverse conversion from a Fragment containing a Fragments object to the Fragments object
This implicit allows to add tags and sections _after_ the examples
This implicit allows to add tags and sections _after_ the examples
implicit definition to accept any MatchResult as a Boolean value.
implicit definition to accept any MatchResult as a Boolean value. It is true if the MatchResult is not an Error or a Failure
shortcut to filter nothing
shortcut to filter nothing
This method transform a function to a Matcher
This method transform a function to a Matcher
This method transform a function, with function descriptors to a Matcher
This method transform a function, with function descriptors to a Matcher
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
This method transform a function to a Matcher
This method transform a function to a Matcher
This method transform a function to a Matcher
This method transform a function to a Matcher
matches if v.
matches if v.getClass == c
matches if x.
matches if x.getClass.getInterfaces.contains(T)
matches if map.
matches if map.contains(k)
matches if map.
matches if map.contains(k) forall key k
alias for haveSize
alias for haveSize
matches if map contains a pair (key, value) == (k, v)
matches if map contains a pair (key, value) == (k, v)
matches if map contains all the specified pairs
matches if map contains all the specified pairs
match if there is a way to size T
match if there is a way to size T
matches if c.
matches if c.isAssignableFrom(v.getClass.getSuperclass)
matches if map contains a pair (key, value) with value == v
matches if map contains a pair (key, value) with value == v
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
specName provides useful information identifying the specification: title, className, url.
specName provides useful information identifying the specification: title, className, url...
automatically convert a specification to its identification
automatically convert a specification to its identification
add a new example using 'in' or '>>' or '!'
add a new example using 'in' or '>>' or '!'
transform a scope to a success to be able to create traits containing any variables and usable in any Examples
transform a scope to a success to be able to create traits containing any variables and usable in any Examples
shortcut to include only some tagged fragments
shortcut to include only some tagged fragments
shortcut to add include trace patterns
shortcut to add include trace patterns
shortcut to create a stackTrace filter to include only some elements
shortcut to create a stackTrace filter to include only some elements
add the fragments of another specification without start and end
add the fragments of another specification without start and end
declaration of Fragments from the user
declaration of Fragments from the user
arguments for a specification where examples must be executed in their own specification
any java collection has a size
any java collection has a size
transform a value to a zero-arg function returning that value
transform a value to a zero-arg function returning that value
alias for haveSize
alias for haveSize
add a new link to the Fragments
add a new link to the Fragments
create a link directly on a specification, with a given link
create a link directly on a specification, with a given link
create a link directly on a specification
create a link directly on a specification
this method can be overridden to map additional behavior in the user-defined fragments
this method can be overridden to map additional behavior in the user-defined fragments
this method can be overriden to intercept a MatchResult and change its message before it is thrown
this method can be overriden to intercept a MatchResult and change its message before it is thrown
this implicit def is necessary when the expression is at the start of the spec The startDepth and offsets are special tweakings to make sure we get the right line in that specific case
this implicit def is necessary when the expression is at the start of the spec The startDepth and offsets are special tweakings to make sure we get the right line in that specific case
this implicit def is necessary when the expression is at the start of the spec
this implicit def is necessary when the expression is at the start of the spec
implicit typeclass instance to create examples from MatchResults
implicit typeclass instance to create examples from MatchResults
This method transform a function returning a Result to a Matcher
This method transform a function returning a Result to a Matcher
implicit typeclass instance to create examples from a sequence of MatchResults
implicit typeclass instance to create examples from a sequence of MatchResults
a Matcher[T] can check a value
a Matcher[T] can check a value
replace the first occurrence of a verb in the negations table with its negation.
replace the first occurrence of a verb in the negations table with its negation.
We first try to negate an existing negation
shortcut to avoid colored output
shortcut to avoid colored output
negate a matcher
negate a matcher
shortcut to execute and print only some examples
shortcut to execute and print only some examples
use an available outside context to transform a function returning a value convertible to a result, into a result
use an available outside context to transform a function returning a value convertible to a result, into a result
This method transform a function returning a pair (Boolean, String for ko message) to a Matcher
This method transform a function returning a pair (Boolean, String for ko message) to a Matcher
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
shortcut to show only the text without any execution
shortcut to show only the text without any execution
this implicit def is necessary when the expression is at the start of the spec
this implicit def is necessary when the expression is at the start of the spec
this implicit def is necessary when the expression is at the start of the spec
this implicit def is necessary when the expression is at the start of the spec
based on the interpolated variables and the expressions captured with the macro, create the appropriate fragments
based on the interpolated variables and the expressions captured with the macro, create the appropriate fragments
if the Yrangepos scalac option is not set then we use an approximated method to find the expressions texts
any scala array has a size
any scala array has a size
any scala collection has a size
any scala collection has a size
typeclass to transform a Scope to a Result
typeclass to transform a Scope to a Result
create a Section fragment
create a see-only link directly on a specification, with a given link
create a see-only link directly on a specification, with a given link
create a html link without including the other specification fragments
create a html link without including the other specification fragments
implicit definition to transform a Seq of MatchResults to a Result
implicit definition to transform a Seq of MatchResults to a Result
arguments for a specification where examples must be executed sequentially
shortcut to print only some statuses
shortcut to print only some statuses
alias for haveSize
alias for haveSize
shortcut to skip all examples
shortcut to skip all examples
shortcut to skip all examples when a condition is true.
shortcut to skip all examples when a condition is true. if the condition throws an exception, its stacktrace is *not* printed and all the examples are skipped
shortcut to skip all examples when a condition is false.
shortcut to skip all examples when a condition is false.
alias for beSorted
alias for beSorted
local mutable contents of the specification
local mutable contents of the specification
create markdown links from string + spec identification
create markdown links from string + spec identification
this implicit allows to call some functions directly on a specification, like 'hide'
this implicit allows to call some functions directly on a specification, like 'hide'
matches if b.
matches if b.startsWith(a)
add a new step to the Fragments
add a new step to the Fragments
shortcut to stop after the first failure or error
shortcut to stop after the first failure or error
add a new stopOnFail step to the Fragments
add a new stopOnFail step to the Fragments
shortcut to stop after the first skipped result
shortcut to stop after the first skipped result
a regular string has a size, without having to be converted to an Traversable
a regular string has a size, without having to be converted to an Traversable
adapt the BeEqualTo matcher to provide ignoreCase and ignoreSpace matcher
adapt the BeEqualTo matcher to provide ignoreCase and ignoreSpace matcher
this allows a function returning a matcher to be used where the same function with a byname parameter is expected
this allows a function returning a matcher to be used where the same function with a byname parameter is expected
this allows the contain(string) matcher for StringMatchers to be used with a Traversable
this allows the contain(string) matcher for StringMatchers to be used with a Traversable
Links to other specifications creation
Links to other specifications creation
org.specs2.UserGuide
create a Tag fragment
This implicit allows to follow a string object by a Formatting fragment
This implicit allows to follow a string object by a Formatting fragment
a Fragments object from a single piece of text
a Fragments object from a string
a matcher checking the value of an Exception
a matcher checking the type of an Exception and its message (as a regexp)
a matcher checking the type of an Exception
alias for throwA
alias for throwA
alias for throwA
alias for throwA
alias for throwA
alias for throwA
This implicit definition allows to declare a number of times
3.times
This implicit definition allows to declare a number of times
3.times
This method allows to add a title to the Specification.
This method allows to add a title to the Specification. It can be used as an operation on a String:
"spec title".title
a Fragments object from a string, with the given title
matcher aliases and implicits to use with be + matcher
matcher aliases and implicits to use with be + matcher
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
This method transform a function returning a triplet (Boolean, String for ok message, String for ko message) to a Matcher
This method transform a function returning a triplet (Boolean, String for ok message, String for ko message) to a Matcher
matches if a == b
matches if a == b
an expected value can be used to check another value
an expected value can be used to check another value
shortcut to include only examples with some previous statuses
shortcut to include only examples with some previous statuses
shortcut to include only previousy failed/errors examples
shortcut to include only previousy failed/errors examples
shortcut to print only failures and errors
shortcut to print only failures and errors
alias for beCloseTo
alias for beCloseTo
alias for beCloseTo
alias for beCloseTo