Remove warning from RSpec
RSpec 3 will no longer infer the spec type from the file location, so 2.99 prints this warning: -------------------------------------------------------------------------------- rspec-rails 3 will no longer automatically infer an example group's spec type from the file location. You can explicitly opt-in to this feature using this snippet: RSpec.configure do |config| config.infer_spec_type_from_file_location! end If you wish to manually label spec types via metadata you can safely ignore this warning and continue upgrading to RSpec 3 without addressing it. -------------------------------------------------------------------------------- So this commit merely adds the snippet to get rid of that warning.
This commit is contained in:
parent
a23081f759
commit
2d32a715de
|
@ -37,6 +37,10 @@ RSpec.configure do |config|
|
||||||
|
|
||||||
config.mock_with :mocha
|
config.mock_with :mocha
|
||||||
config.include Shoulda::Matchers::ActionController, type: :controller
|
config.include Shoulda::Matchers::ActionController, type: :controller
|
||||||
|
|
||||||
|
if config.respond_to?(:infer_spec_type_from_file_location!)
|
||||||
|
config.infer_spec_type_from_file_location!
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
$VERBOSE = true
|
$VERBOSE = true
|
||||||
|
|
Loading…
Reference in New Issue