Comments (1)
I added it and it is complaining about some of the devise specs. I'm happy to update the specs but I think there might be some tweaking of the defaults we want to do:
- Max example length is set to 5 lines - that seems too low and seems like it could have quite negative outcomes in slower system tests where it would encourage devs to make them very granular
- I think RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording might be overly prescriptive. I'm happy to go with what the consensus is but I think we probably should discuss it.
Current failing specs
spec/system/user_reset_password_feature_spec.rb:17:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'. (https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording)
context "existing users" do
^^^^^^^^^^^^^^^^
spec/system/user_reset_password_feature_spec.rb:22:7: C: RSpec/ExampleLength: Example has too many lines [8/5]. (https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleLength)
it "existing users can reset their passwords from the sign-in page" do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/user_reset_password_feature_spec.rb:22:7: C: RSpec/MultipleExpectations: Example has too many expectations [4/2]. (https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleExpectations)
it "existing users can reset their passwords from the sign-in page" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/user_reset_password_feature_spec.rb:41:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'. (https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording)
context "unknown users" do
^^^^^^^^^^^^^^^
spec/system/user_sign_in_feature_spec.rb:19:11: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'. (https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording)
context "A user with valid account details" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/user_sign_in_feature_spec.rb:20:5: C: RSpec/ExampleLength: Example has too many lines [11/5]. (https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleLength)
it "can sign-in and sign-out successfully" do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/user_sign_in_feature_spec.rb:20:5: C: RSpec/MultipleExpectations: Example has too many expectations [6/2]. (https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleExpectations)
it "can sign-in and sign-out successfully" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/user_sign_in_feature_spec.rb:46:7: C: RSpec/ExampleLength: Example has too many lines [18/5]. (https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleLength)
it "user gets a new cookie which allows their login to persist for two weeks" do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/user_sign_in_feature_spec.rb:46:7: C: RSpec/MultipleExpectations: Example has too many expectations [7/2]. (https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleExpectations)
it "user gets a new cookie which allows their login to persist for two weeks" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/user_sign_in_feature_spec.rb:82:11: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'. (https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording)
context "A user with invalid account details" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/user_sign_up_feature_spec.rb:17:3: C: RSpec/ExampleLength: Example has too many lines [7/5]. (https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleLength)
it "Users can sign-up" do ...
^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/user_sign_up_feature_spec.rb:17:3: C: RSpec/MultipleExpectations: Example has too many expectations [3/2]. (https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleExpectations)
it "Users can sign-up" do
^^^^^^^^^^^^^^^^^^^^^^
spec/system/user_sign_up_feature_spec.rb:33:5: C: RSpec/ExampleLength: Example has too many lines [6/5]. (https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleLength)
it "email addresses are validated" do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/user_sign_up_feature_spec.rb:53:5: C: RSpec/ExampleLength: Example has too many lines [6/5]. (https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleLength)
it "passwords are validated for length" do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
from rails-template.
Related Issues (20)
- CI on main failing due to eslint error HOT 1
- Pundit policy checks should automatically fail if current_user is missing
- Devise sign-out link broken by default. Rails-turbo or rails/ujs required. HOT 3
- Upgrade aws-actions/configure-aws-credentials to latest version
- Move from SASS `@import` to `@use`
- Let's add `erblint`
- Disable Rails/SquishedSQLHeredocs rubocop by default
- Remove before_fork, on_worker_boot callbacks from puma config if they are no longer required
- Support Rails 7.1 HOT 2
- Consider using msgpack serialiser
- Rails 7.1 generates Dockerfile by default - integrate it into our Dockerfile HOT 1
- Consider replacing sprockets with propshaft HOT 2
- Discuss adopting Rails 7.1+ config.application_controller.raise_on_missing_callback_actions HOT 2
- Support "documents" as assets out of the box HOT 1
- Use `always` for `SelfClosingTag` in erb-lint HOT 2
- Consider adding TestProf
- Check our parameter sanitisation and filtering for logging & sentry HOT 1
- Move off `axe-matchers`
- Can we make the session cookie SameSite=Strict (currently defaulting to SameSite=Lax)? HOT 1
- Do we want ci to copy example.env instead of having its own list of env vars HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rails-template.