Skip to content

Commit 78ca4b1

Browse files
committed
Use the Rails app path and not a general relative path
1 parent 1b80bc9 commit 78ca4b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/support/factory_bot_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ def seq_padded_for_sorting(n)
1919

2020
require 'factory_bot'
2121

22-
# In case we are running as an engine, the factories are located in the dummy app
23-
FactoryBot.definition_file_paths << 'spec/manageiq/spec/factories'
22+
# In case we are running as an engine, the factories are located in the Rails application
23+
FactoryBot.definition_file_paths << Rails.root.join('spec/factories')
2424

2525
# Also, add factories from provider gems until miq codebase does not use any provider specific factories anymore
2626
Rails::Engine.subclasses.select { |e| e.name.starts_with?("ManageIQ::Providers") }.each do |engine|

0 commit comments

Comments
 (0)