Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't patch ActionView::TestCase outside of test env.

Fixes "cannot load such file -- test/unit/testcase (LoadError)"
when deploying to Heroku.
  • Loading branch information...
commit 16f68a7529dea20372561188e2c6a721e0d305ae 1 parent 967bc9b
@jasoncodes jasoncodes authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/prototype-rails/on_load_action_view.rb
View
8 lib/prototype-rails/on_load_action_view.rb
@@ -14,9 +14,11 @@
include ActionView::Helpers::ScriptaculousHelper
end
-ActionView::TestCase.class_eval do
- include ActionView::Helpers::PrototypeHelper
- include ActionView::Helpers::ScriptaculousHelper
+if Rails.env.test?
+ ActionView::TestCase.class_eval do
+ include ActionView::Helpers::PrototypeHelper
+ include ActionView::Helpers::ScriptaculousHelper
+ end
end
ActionView::Template.register_template_handler :rjs, ActionView::Template::Handlers::RJS.new

0 comments on commit 16f68a7

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