Reputation: 30231
When I run rspec 2 with rails 3 I use
rake rspec
sometimes I'd like to use a different formatter, perhaps doc.
rake rspec --format doc
but unfortunately the option doesn't make it through to the rspec runner. How can I choose a different format when I run the command?
Upvotes: 6
Views: 2415
Reputation: 28245
You can also skip rake and use the rspec command directly. In this case the --format option can be used to tell RSpec how to format the output, "documentation" (or "doc") and "progress" are valid options:
rspec spec --format doc
This is especially useful if you want to run a single test/spec file
rspec spec/models/your_model.rb --format doc
Upvotes: 0
Reputation: 15736
You can add default options to an .rspec file in the rails root folder. e.g.
--colour
--format documentation
Upvotes: 12