diff options
author | Gonçalo Silva <goncalossilva@gmail.com> | 2011-04-03 02:02:35 +0100 |
---|---|---|
committer | Gonçalo Silva <goncalossilva@gmail.com> | 2011-04-03 02:02:35 +0100 |
commit | 5b2b513742ad909ede8956d6021c0bc521c08ddf (patch) | |
tree | 31c1367a433772f9630d034148d005fac95d3051 /railties | |
parent | 677ce63d92b7725b0a11facddc1ba95f50f865df (diff) | |
parent | 99da42c29944beed0cb9e892ae90bfeb2590c57e (diff) | |
download | rails-5b2b513742ad909ede8956d6021c0bc521c08ddf.tar.gz rails-5b2b513742ad909ede8956d6021c0bc521c08ddf.tar.bz2 rails-5b2b513742ad909ede8956d6021c0bc521c08ddf.zip |
Merge branch 'master' of https://github.com/rails/rails into performance_test
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 4 | ||||
-rw-r--r-- | railties/lib/rails/commands/console.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/test_help.rb | 8 | ||||
-rw-r--r-- | railties/railties.gemspec | 2 |
4 files changed, 17 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index c1e0a214d2..f159247308 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,9 @@ *Rails 3.1.0 (unreleased)* +* Add using Turn with natural language test case names for test_help.rb when running with minitest (Ruby 1.9.2+) [DHH] + +* Direct logging of Active Record to STDOUT so it's shown inline with the results in the console [DHH] + * Added `config.force_ssl` configuration which loads Rack::SSL middleware and force all requests to be under HTTPS protocol [DHH, Prem Sichanugrist, and Josh Peek] * Added `rails plugin new` command which generates rails plugin with gemspec, tests and dummy application for testing [Piotr Sarnacki] diff --git a/railties/lib/rails/commands/console.rb b/railties/lib/rails/commands/console.rb index de2f190ad5..2b7faf9715 100644 --- a/railties/lib/rails/commands/console.rb +++ b/railties/lib/rails/commands/console.rb @@ -34,6 +34,10 @@ module Rails exit end end + + if defined?(ActiveRecord) + ActiveRecord::Base.logger = Logger.new(STDERR) + end if options[:sandbox] puts "Loading #{Rails.env} environment in sandbox (Rails #{Rails.version})" diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb index 00029e627e..b9f7bdc2eb 100644 --- a/railties/lib/rails/test_help.rb +++ b/railties/lib/rails/test_help.rb @@ -13,6 +13,14 @@ if defined?(Test::Unit::Util::BacktraceFilter) && ENV['BACKTRACE'].nil? Test::Unit::Util::BacktraceFilter.module_eval { include Rails::BacktraceFilterForTestUnit } end +if defined?(MiniTest) + require 'turn' + + if MiniTest::Unit.respond_to?(:use_natural_language_case_names=) + MiniTest::Unit.use_natural_language_case_names = true + end +end + if defined?(ActiveRecord) require 'active_record/test_case' diff --git a/railties/railties.gemspec b/railties/railties.gemspec index c51fe856be..b1eda71c7f 100644 --- a/railties/railties.gemspec +++ b/railties/railties.gemspec @@ -17,11 +17,11 @@ Gem::Specification.new do |s| s.require_path = 'lib' s.rdoc_options << '--exclude' << '.' - s.has_rdoc = false 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 |