.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "RSPEC 1" .TH RSPEC 1 "2017-05-13" "" "" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" rspec \- standalone test runner for Ruby RSpec test suites .SH "SYNOPSYS" .IX Header "SYNOPSYS" \&\fBrspec\fR [\fIoptions\fR] [\fIfiles or directories\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" The Ruby script \fBrspec\fR allows you to run tests written with RSpec, a testing tool for Ruby, from the command line. When run without arguments, \fBrspec\fR finds automatically all the spec files of your projects, and runs them. It is possible to restrict the tests to a subset by specifying the names of particular spec files or by using some of the filtering options. .PP Various options can be passed to \fBrspec\fR to modify the output of the tests, or the way the tests are run. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-I\fR \fI\s-1PATH\s0\fR" 4 .IX Item "-I PATH" Specify \s-1PATH\s0 to add to \f(CW$LOAD_PATH\fR (may be used more than once). .IP "\fB\-r\fR, \fB\-\-require\fR \fI\s-1PATH\s0\fR" 4 .IX Item "-r, --require PATH" Require a file. .IP "\fB\-O\fR, \fB\-\-options\fR \fI\s-1PATH\s0\fR" 4 .IX Item "-O, --options PATH" Specify the path to a custom options file. .IP "\fB\-\-order\fR \fI\s-1TYPE\s0\fR[:\fI\s-1SEED\s0\fR]" 4 .IX Item "--order TYPE[:SEED]" Run examples by the specified order type. \fI\s-1TYPE\s0\fR can be either \fBdefault\fR, for which files are ordered based on the underlying file system's order, or \fBrand\fR, for which the order of files, groups and examples is randomized. \fBrandom\fR is an alias for \fBrand\fR. A \fI\s-1SEED\s0\fR can be indicated for the \fBrandom\fR type, e.g. \fB\-\-order\fR \&\fBrandom\fR:123 .IP "\fB\-\-seed\fR \fI\s-1SEED\s0\fR" 4 .IX Item "--seed SEED" Equivalent of \fB\-\-order\fR \fBrand\fR:\fI\s-1SEED\s0\fR. .IP "\fB\-d\fR, \fB\-\-debugger\fR" 4 .IX Item "-d, --debugger" Enable debugging. .IP "\fB\-\-fail\-fast\fR" 4 .IX Item "--fail-fast" Abort the run on first failure. .IP "\fB\-\-failure\-exit\-code\fR \fI\s-1CODE\s0\fR" 4 .IX Item "--failure-exit-code CODE" Override the exit code used when there are failing specs. .IP "\fB\-X\fR, \fB\-\-\fR[\fBno\-\fR]\fBdrb\fR" 4 .IX Item "-X, --[no-]drb" Run examples via DRb. .IP "\fB\-\-drb\-port\fR \fI\s-1PORT\s0\fR" 4 .IX Item "--drb-port PORT" Port to connect to the DRb server. .IP "\fB\-\-init\fR" 4 .IX Item "--init" Initialize your project with RSpec. .IP "\fB\-\-configure\fR" 4 .IX Item "--configure" Deprecated. Use \fB\-\-init\fR instead. .SH "OUTPUT OPTIONS" .IX Header "OUTPUT OPTIONS" .IP "\fB\-f\fR, \fB\-\-format\fR \fI\s-1FORMATTER\s0\fR" 4 .IX Item "-f, --format FORMATTER" Choose a formatter. The various choices are [\fBp\fR]\fBrogress\fR (default \- dots), [\fBd\fR]\fBocumentation\fR (group and example names), [\fBh\fR]\fBtml\fR, [\fBt\fR]\fBextmate\fR or a custom formatter class name. .IP "\fB\-o\fR, \fB\-\-out\fR \fI\s-1FILE\s0\fR" 4 .IX Item "-o, --out FILE" Write output to a file instead of \s-1STDOUT.\s0 This option applies to the previously specified \fB\-\-format\fR, or the default format if no format is specified. .IP "\fB\-b\fR, \fB\-\-backtrace\fR" 4 .IX Item "-b, --backtrace" Enable full backtrace. .IP "\fB\-c\fR, \fB\-\-\fR[\fBno\-\fR]\fBcolor\fR, \fB\-\-\fR[\fBno\-\fR]\fBcolour\fR" 4 .IX Item "-c, --[no-]color, --[no-]colour" Enable color in the output. .IP "\fB\-p\fR, \fB\-\-profile\fR" 4 .IX Item "-p, --profile" Enable profiling of examples and list 10 slowest examples. .SH "FILTERING AND TAG OPTIONS" .IX Header "FILTERING AND TAG OPTIONS" In addition to the following options for selecting specific files, groups, or examples, you can select a single example by appending the line number to the filename: .PP .Vb 1 \& rspec path/to/a_spec.rb:37 .Ve .IP "\fB\-P\fR, \fB\-\-pattern\fR \fI\s-1PATTERN\s0\fR" 4 .IX Item "-P, --pattern PATTERN" Load files matching pattern (default: \*(L"spec/**/*_spec.rb\*(R"). .IP "\fB\-e\fR, \fB\-\-example\fR \fI\s-1STRING\s0\fR" 4 .IX Item "-e, --example STRING" Run examples whose full nested names include \fI\s-1STRING\s0\fR. .IP "\fB\-l\fR, \fB\-\-line_number\fR \fI\s-1LINE\s0\fR" 4 .IX Item "-l, --line_number LINE" Specify line number of an example or group (may be used more than once). .IP "\fB\-t\fR, \fB\-\-tag\fR \fI\s-1TAG\s0\fR[:\fI\s-1VALUE\s0\fR]" 4 .IX Item "-t, --tag TAG[:VALUE]" Run examples with the specified tag, or exclude examples by adding ~ before the tag, e.g. ~slow. \fI\s-1TAG\s0\fR is always converted to a symbol. .IP "\fB\-\-default_path\fR \fI\s-1PATH\s0\fR" 4 .IX Item "--default_path PATH" Set the default path where RSpec looks for examples (can be a path to a file or a directory). .SH "UTILITY OPTIONS" .IX Header "UTILITY OPTIONS" .IP "\fB\-v\fR, \fB\-\-version\fR" 4 .IX Item "-v, --version" Display the version. .IP "\fB\-h\fR, \fB\-\-help\fR" 4 .IX Item "-h, --help" Display a message similar to this manpage. .SH "AUTHORS" .IX Header "AUTHORS" This man page inspired by the help message of \fBrspec\fR, has been written by Cédric Boutillier for the Debian Project, but may be used by others.