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

Cop Idea: no/max nested contexts #177

Closed
mockdeep opened this issue Aug 10, 2016 · 2 comments
Closed

Cop Idea: no/max nested contexts #177

mockdeep opened this issue Aug 10, 2016 · 2 comments

Comments

@mockdeep
Copy link
Contributor

Would love to have a cop which restricts the number of nested contexts allowed. It's generally a code smell when the nesting has to go deeper than 1:

# bad
RSpec.describe 'foo' do
  context 'when that thing' do
    context 'when this other thing' do
      it 'does something'
    end
  end
end

# good
context 'when that thing' do
    it 'does something'
end
@andyw8
Copy link
Collaborator

andyw8 commented Aug 10, 2016

This was just added recently, but hasn't yet been released: #156

@mockdeep
Copy link
Contributor Author

Ah, cool. Thanks!

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