Run formatter documentation when running a single file

Today if we run a single file or spec like `callback_matcher_spec.rb` or
`callback_matcher_spec.rb:12` the formatter is the default dot.

With this config when we run a single file or spec the formatter is the
documentation and when we run the suite the formatter is the default dot.
This commit is contained in:
Mauro George 2015-06-13 10:37:31 -03:00
parent a3fb06c369
commit c14f344e3e
1 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,10 @@ RSpec.configure do |config|
c.syntax = :expect
end
if config.files_to_run.one?
config.default_formatter = 'doc'
end
config.mock_with :rspec
if config.respond_to?(:infer_spec_type_from_file_location!)