Skip to content

Reorder ee jh spec_helper

Baodong请求将reoder-ee-jh-rspec-support-with-config合并到main-jh

Close #1639 (closed)

Depends on upstream MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/94919 (merged)

What does this MR do and why?

Make jh spec_helper load after ee spec_helper to improve flexibility of jh test.

  • still can use prepend_mod in spec modules
  • can override ce/ee spec modules through Ruby re-open
  • can override ce/ee spec config

Other Implement [closed]

!773 (closed) does the same thing.

Current MR is simpler and more direct.

cc EM @prajnamas


Reference

https://guides.rubyonrails.org/autoloading_and_reloading_constants.html#autoloading-when-the-application-boots

While booting, applications can autoload from the autoload once paths, which are managed by the once autoloader. Please check the section config.autoload_once_paths above.

However, you cannot autoload from the autoload paths, which are managed by the main autoloader. This applies to code in config/initializers as well as application or engines initializers.

so, we can't re-define autoload_paths under config/initializes .

Baodong 编辑于

合并请求报告

加载中