From bc95767b149670b2e761427506c3084c3682b6f7 Mon Sep 17 00:00:00 2001 From: Aaron Suggs Date: Mon, 7 Jan 2013 14:51:38 -0500 Subject: Don't require 'turn' from rails/test_help If 'turn' is in the Gemfile with `:require => nil`, Rails should respect that. This supports the case where 'turn' may or may not be required depending on different developers' preference or environment. E.g., you require turn for local testing, but not on your CI server by putting this in `test/test_helper.rb`: require 'turn' if ENV['TURN'] --- railties/lib/rails/test_help.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'railties/lib') diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb index 616206dd0b..1894ed7cdc 100644 --- a/railties/lib/rails/test_help.rb +++ b/railties/lib/rails/test_help.rb @@ -11,14 +11,11 @@ require 'action_dispatch/testing/integration' require 'rails/backtrace_cleaner' MiniTest.backtrace_filter = Rails.backtrace_cleaner -# Enable turn if it is available -begin - require 'turn' - +# Configure turn if it is available +if defined?(Turn) Turn.config do |c| c.natural = true end -rescue LoadError end if defined?(ActiveRecord::Base) -- cgit v1.2.3