Skip to content

Commit

Permalink
Don't require 'turn' from rails/test_help
Browse files Browse the repository at this point in the history
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']
  • Loading branch information
ktheory committed Jan 7, 2013
1 parent e274db9 commit bc95767
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions railties/lib/rails/test_help.rb
Expand Up @@ -11,14 +11,11 @@
require 'rails/backtrace_cleaner' require 'rails/backtrace_cleaner'
MiniTest.backtrace_filter = Rails.backtrace_cleaner MiniTest.backtrace_filter = Rails.backtrace_cleaner


# Enable turn if it is available # Configure turn if it is available
begin if defined?(Turn)
require 'turn'

Turn.config do |c| Turn.config do |c|
c.natural = true c.natural = true
end end
rescue LoadError
end end


if defined?(ActiveRecord::Base) if defined?(ActiveRecord::Base)
Expand Down

0 comments on commit bc95767

Please sign in to comment.