Sha256: 72763e43dbeb5059ddc73cd0f078d9ca4f6c5aacfe15e4a95c33c8c71be4cd7b

Contents?: true

Size: 862 Bytes

Versions: 2

Compression:

Stored size: 862 Bytes

Contents

RSpec.configure do |config|
  def config.infer_spec_type_from_file_location!
    @infer_spec_type_from_file_location = true
  end

  def config.infer_spec_type_from_file_location?
    @infer_spec_type_from_file_location ||= false
  end

  config.before do
    unless config.infer_spec_type_from_file_location?
      RSpec.warn_deprecation(<<-EOS.gsub(/^\s+\|/,''))
       |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.
      EOS
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rspec-rails-2.99.0 lib/rspec/rails/infer_type_configuration.rb
rspec-rails-2.99.0.rc1 lib/rspec/rails/infer_type_configuration.rb