Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add acceptance to RSpec::Rails::DIRECTORY_MAPPINGS #169

Merged
merged 1 commit into from
Nov 12, 2014

Conversation

potomak
Copy link
Contributor

@potomak potomak commented Nov 2, 2014

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:

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

@potomak
Copy link
Contributor Author

potomak commented Nov 10, 2014

Any news about this PR?

oestrich added a commit that referenced this pull request Nov 12, 2014
Add acceptance to RSpec::Rails::DIRECTORY_MAPPINGS
@oestrich oestrich merged commit ec070a0 into zipmark:master Nov 12, 2014
@oestrich
Copy link
Contributor

Thanks!

@potomak
Copy link
Contributor Author

potomak commented Nov 12, 2014

Thank you!

@potomak potomak deleted the acceptance_example_type branch November 12, 2014 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants