Skip to content
Browse files

Revert "Merge pull request #28 from grosser/grosser/test-load"

This reverts commit 3f512ec, reversing
changes made to 2841450.

Reason: I'll use the solution in
#23 that doesn't check the
Rails environment
  • Loading branch information...
1 parent 6849a2b commit bc8041559a11c16ef25228b019250b3cc122e115 Rafael Mendonça França committed Feb 6, 2014
Showing with 5 additions and 12 deletions.
  1. +0 −6 lib/prototype-rails.rb
  2. +5 −0 lib/prototype-rails/on_load_action_view.rb
  3. +0 −6 test/lib/abstract_unit.rb
View
6 lib/prototype-rails.rb
@@ -10,12 +10,6 @@ class Engine < Rails::Engine
ActiveSupport.on_load(:action_view) do
require 'prototype-rails/on_load_action_view'
- if Rails.env.test?
- ActionView::TestCase.class_eval do
- include ActionView::Helpers::PrototypeHelper
- include ActionView::Helpers::ScriptaculousHelper
- end
- end
end
end
end
View
5 lib/prototype-rails/on_load_action_view.rb
@@ -14,4 +14,9 @@
include ActionView::Helpers::ScriptaculousHelper
end
+ActionView::TestCase.class_eval do
+ include ActionView::Helpers::PrototypeHelper
+ include ActionView::Helpers::ScriptaculousHelper
+end
+
ActionView::Template.register_template_handler :rjs, ActionView::Template::Handlers::RJS.new
View
6 test/lib/abstract_unit.rb
@@ -8,12 +8,6 @@
require 'action_view'
require 'action_view/testing/resolvers'
-module Rails
- def self.env
- ActiveSupport::StringInquirer.new("test")
- end
-end
-
require 'prototype-rails/on_load_action_controller'
require 'prototype-rails/on_load_action_view'

0 comments on commit bc80415

Please sign in to comment.
Something went wrong with that request. Please try again.