From 985ddda714a68e449b0c07c991a8b4a89f02c614 Mon Sep 17 00:00:00 2001 From: Giovanni Cappellotto Date: Sun, 2 Nov 2014 17:49:42 +0100 Subject: [PATCH] Add acceptance to RSpec::Rails::DIRECTORY_MAPPINGS --- lib/rspec_api_documentation/dsl.rb | 5 +++++ 1 file changed, 5 insertions(+) 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