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:
Elliot Winkler 2014-10-17 12:27:53 -06:00
parent a23081f759
commit 2d32a715de
1 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,10 @@ RSpec.configure do |config|
config.mock_with :mocha
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
$VERBOSE = true