Skip to content

Commit

Permalink
fix overriding ActionController::Live with test_behaviour when not te…
Browse files Browse the repository at this point in the history
…st mode
  • Loading branch information
gurix committed Mar 21, 2018
1 parent 6279fb1 commit 7db6ba8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/route_translator/extensions/action_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ def _routes

ActiveSupport.on_load(:action_controller) do
ActionController::Base.send :include, RouteTranslator::Controller
ActionController::TestCase.send :include, RouteTranslator::TestCase
ActionController::TestCase.send :include, RouteTranslator::TestCase if ENV['RAILS_ENV'] == 'test'
end
2 changes: 1 addition & 1 deletion lib/route_translator/translator/route_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def add(old_name, named_route_collection)
__send__(Translator.route_name_for(args, old_name, suffix, self), *args)
end

add_helpers_to_test_cases(helper_container)
add_helpers_to_test_cases(helper_container) if ENV['RAILS_ENV'] == 'test'
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/route_translator/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module RouteTranslator
VERSION = '5.6.0'.freeze
VERSION = '5.6.1'.freeze
end

0 comments on commit 7db6ba8

Please sign in to comment.