-
Bogdan Denkovych authored
In https://gitlab.com/gitlab-org/gitlab/-/merge_requests/72964 we disabled eager loading for the test environment. As it was mentioned there are specs that depend on all the application that is being loaded. See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/72964#note_713060754 This MR introduces `:eager_load` rspec tag and adds this tag to specs that require it. There are still might be some specs that require this tag. This MR do not address all the cases from https://gitlab.com/gitlab-org/gitlab/-/issues/343878. Those two still need further investigation: - https://gitlab.com/gitlab-org/gitlab/blob/8ba2a598bab0475bd6f2ab9ebcef4a1852b8d512/spec/support/before_all_adapter.rb#L5 - https://gitlab.com/gitlab-org/gitlab/blob/452d554d81b0e310ef0e86eb8ea3a1c7bf6fbf90/spec/support/helpers/migrations_helpers.rb#L70 So I am not sure whether we can close the issue after merging this MR. Adding this tag to the spec would make `Rails.application.eager_load!` be called before its execution to load the application code. See https://api.rubyonrails.org/classes/Rails/Application.html#method-i-eager_load-21
52c9045b