Skip to content

Commit

Permalink
Only lazy load in test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdebruin committed Dec 19, 2023
1 parent b16c3ec commit c55d045
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/route_translator/translator/route_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def add(old_name, named_route_collection)
__send__(Translator.route_name_for(args, old_name, suffix, self), *args)
end

next unless ENV.fetch('RAILS_ENV', nil) == 'test'

TEST_CASE_HOOKS.each do |test_case_hook|
ActiveSupport.on_load(test_case_hook) do
include helper_container
Expand Down

0 comments on commit c55d045

Please sign in to comment.