zipmark/rspec_api_documentation — pull request #169 by potomak (2014-11-02 17:09:46+00:00)
Title: Add acceptance to RSpec::Rails::DIRECTORY_MAPPINGS

Adding `:acceptance` to `DIRECTORY_MAPPINGS` and reapplying `infer_spec_type_from_file_location!` you can discern acceptance examples using `example.metadata[:type]`.

In your `spec/rails_helper.rb` for example you could put something like this:

```ruby
RSpec.configure do |config|
config.before(:each) do |example|
# an acceptance example
if example.metadata[:type] == :acceptance && example.metadata[:auth]
# stub authentication here
end
end
end
```