The source project of this merge request has been removed.
Fix running a single spec file with rspec
What does this MR do?
In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24694 we merged a fix for the select2
helper to avoid JS race conditions. However, in so doing, we broke invocations like:
bundle exec rspec spec/lib/gitlab/import_export/attribute_configuration_spec.rb
The result without this fix is:
An error occurred while loading ./spec/lib/gitlab/import_export/attribute_configuration_spec.rb.
Failure/Error: include WaitForRequests
NameError:
uninitialized constant Select2Helper::WaitForRequests
# /home/lupine/.gem/ruby/2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:74:in `block in load_missing_constant'
# /home/lupine/.gem/ruby/2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:8:in `without_bootsnap_cache'
# /home/lupine/.gem/ruby/2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:74:in `rescue in load_missing_constant'
# /home/lupine/.gem/ruby/2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:56:in `load_missing_constant'
# ./spec/support/helpers/select2_helper.rb:14:in `<module:Select2Helper>'
# ./spec/support/helpers/select2_helper.rb:13:in `<main>'
# /home/lupine/.gem/ruby/2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
# /home/lupine/.gem/ruby/2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
# /home/lupine/.gem/ruby/2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
# /home/lupine/.gem/ruby/2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
# /home/lupine/.gem/ruby/2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
# ./spec/spec_helper.rb:42:in `block in <top (required)>'
# ./spec/spec_helper.rb:42:in `each'
# ./spec/spec_helper.rb:42:in `<top (required)>'
# ./spec/lib/gitlab/import_export/attribute_configuration_spec.rb:1:in `require'
# ./spec/lib/gitlab/import_export/attribute_configuration_spec.rb:1:in `<top (required)>'
# ------------------
# --- Caused by: ---
# NameError:
# uninitialized constant Select2Helper::WaitForRequests
# /home/lupine/.gem/ruby/2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:58:in `block in load_missing_constant'
No examples found.
Finished in 0.00027 seconds (files took 6.05 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer