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
Clean up AuthenticationWorkflow spec helper #5828
Conversation
34e8a00
to
b111b5b
Compare
…gin_as_enterprise_user
66f08ab
to
520c6b7
Compare
…unnecessarily This commit removes 19 unnecessary page loads of the admin dashboard
…o_admin_and_visit when applicable
…x rubocop todo files
nice, thanks Pau. Can you approve the PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ups, sorry
# # Equivalent to being in spec/controllers | ||
# end | ||
config.infer_spec_type_from_file_location! | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed this. This block shouldn't be here at all but in spec/spec_helper.rb
. I'll patch this myself and it'll be ready to go. The longer we wait the more chances of this PR becoming stale.
Spec files individually include the module and we specify the type of spec in each RSpec's describe so none of this settings are needed. They are just Spree's legacy I bet.
Apparently, although we tend to add the type of spec file some RSpec methods are not working without it. We're getting: ``` NoMethodError: undefined method `helper' for RSpec::ExampleGroups::SpreeSharedOrderDetailsHtmlHaml:Class ``` ``` NameError: undefined local variable or method `controller' for #<RSpec::ExampleGroups::SpreeAdminUsersController::AuthorizeAdmin:0x00007fa8b32addf8> # ./spec/controllers/spree/admin/users_controller_spec.rb:10:in `block (3 levels) in <top (required)>' ``` It needs more investigation but another day.
Here comes my hope as a new commit |
Green light! Merging! |
What? Why?
Originated from #5827 I did a few things here:
What should we test?
This is only changing specs, a green build is enough.
Release notes
Changelog Category: Changed
Simplified the code and improved speed of specs.