1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

make turn a soft dependency. generate a Gemfile that contains turn and require turn if it is available

This commit is contained in:
Aaron Patterson 2011-04-08 09:40:33 -07:00
parent 2cdc1f0cd5
commit bd79172e43
3 changed files with 14 additions and 7 deletions

View file

@ -23,9 +23,13 @@ source 'http://rubygems.org'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
group :development, :test do
# Depend "turn" for pretty printing test output, but disable autorequire.
gem 'turn', :require => false
# gem 'webrat'
end
# Needed for guides generation
# gem "RedCloth", "~> 4.2"

View file

@ -14,10 +14,14 @@ if defined?(Test::Unit::Util::BacktraceFilter) && ENV['BACKTRACE'].nil?
end
if defined?(MiniTest)
require 'turn'
# Enable turn if it is available
begin
require 'turn'
if MiniTest::Unit.respond_to?(:use_natural_language_case_names=)
MiniTest::Unit.use_natural_language_case_names = true
if MiniTest::Unit.respond_to?(:use_natural_language_case_names=)
MiniTest::Unit.use_natural_language_case_names = true
end
rescue LoadError
end
end

View file

@ -21,7 +21,6 @@ Gem::Specification.new do |s|
s.add_dependency('rake', '>= 0.8.7')
s.add_dependency('thor', '~> 0.14.4')
s.add_dependency('rack-ssl', '~> 1.3.2')
s.add_dependency('turn', '~> 0.8.2')
s.add_dependency('activesupport', version)
s.add_dependency('actionpack', version)
end