diff --git a/lib/rspec_api_documentation/dsl.rb b/lib/rspec_api_documentation/dsl.rb index 2397ab72..646337ab 100644 --- a/lib/rspec_api_documentation/dsl.rb +++ b/lib/rspec_api_documentation/dsl.rb @@ -35,3 +35,8 @@ def resource(*args, &block) RSpec.configuration.include RspecApiDocumentation::DSL::Endpoint, :api_doc_dsl => :endpoint RSpec.configuration.include RspecApiDocumentation::DSL::Callback, :api_doc_dsl => :callback RSpec.configuration.backtrace_exclusion_patterns << %r{lib/rspec_api_documentation/dsl/} + +if defined? RSpec::Rails + RSpec::Rails::DIRECTORY_MAPPINGS[:acceptance] = %w[spec acceptance] + RSpec.configuration.infer_spec_type_from_file_location! +end