Skip to content

Commit ffbff20

Browse files
committed
Ensure that better errors not called if undefined
1 parent f3ab499 commit ffbff20

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

spec/dummy/config/environments/development.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,11 @@
8585
# Uncomment if you wish to allow Action Cable access from any origin.
8686
# config.action_cable.disable_request_forgery_protection = true
8787

88-
BetterErrors::Middleware.allow_ip! '0.0.0.0/0'
88+
BetterErrors::Middleware.allow_ip! '0.0.0.0/0' if defined?(BetterErrors)
89+
90+
if defined?(FactoryBot)
91+
config.to_prepare do
92+
FactoryBot.definition_file_paths << File.join(BetterTogether::Engine.root, 'spec', 'factories')
93+
end
94+
end
8995
end

0 commit comments

Comments
 (0)