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

Feature / integration / acceptance spec styles #197

Open
thehenster opened this issue Aug 1, 2018 · 2 comments
Open

Feature / integration / acceptance spec styles #197

thehenster opened this issue Aug 1, 2018 · 2 comments

Comments

@thehenster
Copy link

thehenster commented Aug 1, 2018

A community styleguide for feature specs (capybara / rails) would be useful, as well more general guidance for longer acceptance / integration tests.

For example..

Should a large acceptance test describe everything it hopes to prove in a multiline example description? Or should we favour a shorter description with comments to tell the story (if required)?

# GOOD
scenario "A user is created, " \
         "a welcome email is sent, " \
         "and they are shown their dashboard"
  ...
end
# BAD
scenario "User signup" do
  # A user is created
  ...
  # A welcome email is sent
  ...
  # They are shown their dashboard
  ...
end

My question is more about whether betterspecs should be talking about acceptance specs, rather than the above example.

@thehenster
Copy link
Author

I found http://rubocop-rspec.readthedocs.io/en/latest/cops_capybara/. While capybara specific, it does seem like the type of thing I was talking about.

@akz92
Copy link
Member

akz92 commented Mar 20, 2020

I like that! Feature tests are (or IMO should be) an important part of an application's test suite. Would you like to start this? And then maybe we could open it for discussion once we have something to talk about.

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

No branches or pull requests

2 participants