Giter Club home page Giter Club logo

Comments (1)

eoinkelly avatar eoinkelly commented on August 11, 2024

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:

  1. 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
  2. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.