Rspec output format: documentation

When I run rspec with rake rspec and my tests are out of order, an error message appears. However, when my tests are ok, I just get "..". No other way out. How can I get it to print something like:

 A User .... can only have one name A User .... can ... 
+64
ruby ruby-on-rails rspec
Feb 22 2018-11-22T00:
source share
3 answers

rspec help rspec

 $ rspec --help Usage: rspec [options] [files or directories] -f, --format FORMATTER Choose a formatter [p]rogress (default - dots) [d]ocumentation (group and example names) [h]tml [t]extmate custom formatter class name 

Pass the -f option. Instead

 $ rake rspec 

run

 $ rspec spec --format d 

or short format:

 $ rspec -fd 

If you want the configuration to be permanent, create a .rspec file in the root directory of your project and write the configuration there.

+108
Feb 22 '11 at 20:51
source share

Using:

 rspec spec --format documentation 
+4
Jul 19 '13 at 12:57 on
source share

Inside spec/spec_helper

 RSpec.configure do |config| config.formatter = :documentation end 

therefore you do not need to run the flag every time.

+3
Jun 30 '17 at 23:55
source share



All Articles