diff options
author | Aaron Suggs <aaron@ktheory.com> | 2013-01-07 14:51:38 -0500 |
---|---|---|
committer | Aaron Suggs <aaron@ktheory.com> | 2013-01-07 14:51:38 -0500 |
commit | bc95767b149670b2e761427506c3084c3682b6f7 (patch) | |
tree | bf6067dfb86279c0d4ba7c176f767d98cb0cd02b | |
parent | e274db9edc31536510eef42ad61f170bd2787e13 (diff) | |
download | rails-bc95767b149670b2e761427506c3084c3682b6f7.tar.gz rails-bc95767b149670b2e761427506c3084c3682b6f7.tar.bz2 rails-bc95767b149670b2e761427506c3084c3682b6f7.zip |
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']
-rw-r--r-- | railties/lib/rails/test_help.rb | 7 |
1 files changed, 2 insertions, 5 deletions
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) |