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:
parent
a3fb06c369
commit
c14f344e3e
|
@ -30,6 +30,10 @@ RSpec.configure do |config|
|
||||||
c.syntax = :expect
|
c.syntax = :expect
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if config.files_to_run.one?
|
||||||
|
config.default_formatter = 'doc'
|
||||||
|
end
|
||||||
|
|
||||||
config.mock_with :rspec
|
config.mock_with :rspec
|
||||||
|
|
||||||
if config.respond_to?(:infer_spec_type_from_file_location!)
|
if config.respond_to?(:infer_spec_type_from_file_location!)
|
||||||
|
|
Loading…
Reference in New Issue