print a message after the execution based on the number of specifications
print a message after the execution based on the number of specifications
append some content to a file and take care of closing the file.
append some content to a file and take care of closing the file.
Usage:
write("./dir/hello.txt") { out =>
out.write("content")
}
path of the file to write
writes some content to a file.
writes some content to a file.
path of the file to read
content of the file to write
writes some xml content to a file.
writes some xml content to a file.
path of the file to read
content of the file to write
print a message before the execution
print a message before the execution
true if the file can be read
true if the file can be written
adds possible specification class names found in the file filePath
The specification pattern is: "\\s*object\\s*(" + pattern + ")\\s*extends\\s*.*Spec.*\\s*\\{"
This may be later extended to support other arbitrary patterns
The specification pattern is: "\\s*object\\s*(" + pattern + ")\\s*extends\\s*.*Spec.*\\s*\\{"
This may be later extended to support other arbitrary patterns
adds possible specification class names found in the file filePath
The specification pattern is: "\\s*object\\s*(" + pattern + ")\\s*extends\\s*.*Spec.*\\s*\\{"
This may be later extended to support other arbitrary patterns
the base package for the class names
content of the file
a regular expression which is supposed to match an object name extending a Specification
Copy an input stream to an output stream.
Copy an input stream to an output stream.
input stream
output stream
copy the content of a directory to another.
copy the content of a directory to another.
destination directory path
copy the content of a directory to another.
copy the content of a directory to another.
url of the directory to copy
destination directory path
Copy the content of a directory to another.
Copy the content of a directory to another.
path of the file to copy
destination directory path
Copy specs resources found either in the specs jar or in the classpath directories to an output directory
Copy specs resources found either in the specs jar or in the classpath directories to an output directory
name of the resource directory to copy
output directory where to copy the files to
an instance of a given class, returning either the instance, or an exception
the Arguments object depending on the command-line options
creates a directory for a given path
creates a directory for a given path
creates a file for a given path.
creates a file for a given path. Create the parent directory if necessary.
A system property 'debugCreateObject' can be set to override the printMessage and printStackTrace parameters so that the exception message and stacktrace are printed when the object can't be created
A system property 'debugCreateObject' can be set to override the printMessage and printStackTrace parameters so that the exception message and stacktrace are printed when the object can't be created
an instance of a given class and optionally print message and/or the stacktrace if the class can't be loaded.
an instance of a given class and optionally print message if the class can't be loaded
an instance of a given class
a SpecificationStructure
object from a className if that class is a SpecificationStructure
class.
Tries to load the class name and cast it to a specification
None in case of an exception.
a SpecificationStructure
object from a className if that class is a SpecificationStructure
class.
Tries to load the class name and cast it to a specification
None in case of an exception.
delete a file
delete a file
report a specification
report a specification
true if the file exists
exit the system with a specific code:
exit the system with a specific code:
- 0 if all the specifications are successful - 1 if there are only failures - 100 if there is any error - 101 if one of them could not even be executed (this is represented by None)
exit the system for one executed specification (None means that the specification could not be executed)
exit the system for one executed specification (None means that the specification could not be executed)
this method can be overriden for testing
this method can be overriden for testing
glob expression, for example: ./dir/**/.xml
the list of paths represented by the "glob" definition path
flush the content if necessary
flush the content if necessary
the file absolute path
the file canonical path
the file name
the file parent path
The getWriter function can be overriden to provide a mock writer writing to the console for example
The getWriter function can be overriden to provide a mock writer writing to the console for example
a Writer object opened on the file designated by path
the regular expression equivalent to a glob pattern (see the specs for Fragments)
a FileInputStream for a given file path
true if the file is absolute
true if the File represented by this path is a directory
true if the file is a directory
true if the file is a file
true if the file is hidden
the files of that directory
the xml content of a file using the Xhtml parser
if the file contains several nodes, it wraps them up in a single artificial node
the xml content of a file, using the XML parser
creates a new directory
creates a new directory
the package declaration at the beginning of a file
print an object with no newline
print an object with no newline
print stacktraces
print stacktraces
print several objects according to a format string (see Console.
print several objects according to a format string (see Console.printf)
print an object with a newline
print an object with a newline
reads the content of a file
reads the content of a file
the path of the file to read
the content of the file at path
deletes the directory and all directory content at the specified path and return the parent path of that directory
deletes the directory and all directory content at the specified path and return the parent path of that directory
a reporter depending on the provided arguments
true if 2 paths are the same according to their canonical representation
pattern to use to get specification names from file contents
pattern to use to get specification names from file contents
the specifications class names to execute
a path to a directory containing scala files (it can be a glob: i.e. "dir/**/spec.scala")
a regular expression which is supposed to match an object name extending a Specification
specification names by scanning files and trying to find specifications declarations
the specifications to execute
a path to a directory containing scala files (it can be a glob: i.e. "dir/**/spec.scala")
a regular expression which is supposed to match an object name extending a Specification
a function to filter out unwanted specifications
specifications created from specification names
Try to create an instance of a given class by using whatever constructor is available and trying to instantiate the first parameter recursively if there is a parameter for that constructor.
Try to create an instance of a given class by using whatever constructor is available and trying to instantiate the first parameter recursively if there is a parameter for that constructor.
This is useful to instantiate nested classes which are referencing their outer class in their constructor
Try to create an instance of a given class by using whatever constructor is available and trying to instantiate the first parameter recursively if there is a parameter for that constructor.
Try to create an instance of a given class by using whatever constructor is available and trying to instantiate the first parameter recursively if there is a parameter for that constructor.
This is useful to instantiate nested classes which are referencing their outer class in their constructor
Unjar the jar (or zip file) specified by "path" to the "dest" directory.
Unjar the jar (or zip file) specified by "path" to the "dest" directory. Filters files which shouldn't be extracted with a regular expression.
path of the jar file
regular expression filtering files which shouldn't be extracted
Unjar the jar (or zip file) specified by "path" to the "dest" directory.
Unjar the jar (or zip file) specified by "path" to the "dest" directory.
path of the jar file
destination directory path
writes some content to a file and take care of closing the file.
writes some content to a file and take care of closing the file.
Usage:
write("./dir/hello.txt") { out =>
out.write("content")
}
path of the file to write
writes some content to a file.
writes some content to a file.
path of the file to read
content of the file to write
writes some xml content to a file.
writes some xml content to a file.
path of the file to read
content of the file to write