Merge pull request #48323 from Eric-Guo/ci_fixture_vendor_no_loading
Exclude the vendor as including vendor will cause CI break after merge #48287
This commit is contained in:
commit
6bb8bd3091
@ -619,7 +619,7 @@ def load_seed
|
||||
next if is_a?(Rails::Application)
|
||||
|
||||
fixtures = config.root.join("test", "fixtures")
|
||||
if fixtures.exist? && fixtures.to_s.start_with?(Rails.root.to_s)
|
||||
if fixtures_in_root_and_not_in_vendor?(fixtures)
|
||||
ActiveSupport.on_load(:active_record_fixtures) { self.fixture_paths |= ["#{fixtures}/"] }
|
||||
end
|
||||
end
|
||||
@ -727,6 +727,11 @@ def _all_load_paths(add_autoload_paths_to_load_path)
|
||||
end
|
||||
end
|
||||
|
||||
def fixtures_in_root_and_not_in_vendor?(fixtures)
|
||||
fixtures.exist? && fixtures.to_s.start_with?(Rails.root.to_s) &&
|
||||
!fixtures.to_s.start_with?(Rails.root.join("vendor").to_s)
|
||||
end
|
||||
|
||||
def build_request(env)
|
||||
env.merge!(env_config)
|
||||
req = ActionDispatch::Request.new env
|
||||
|
Loading…
Reference in New Issue
Block a user