aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew White <andrew.white@unboxed.co>2016-11-03 11:47:08 +0000
committerAndrew White <andrew.white@unboxed.co>2016-11-03 11:47:08 +0000
commit4267db8ed6e68a703858fcdc2defe95bee83156d (patch)
tree3d26aa2d1e6d50a6ecc7b99c0dcb65f07276fe00
parentbee2f6d317cd186b5a6c1fe6d03caca545aa881c (diff)
downloadrails-4267db8ed6e68a703858fcdc2defe95bee83156d.tar.gz
rails-4267db8ed6e68a703858fcdc2defe95bee83156d.tar.bz2
rails-4267db8ed6e68a703858fcdc2defe95bee83156d.zip
Flushing all logs fixed in Ruby 2.3
Previously, flushing all logs in Ruby 2.0 and later would raise an exception when there was no DATABASE_URL or database.yml. Whatever was the cause of that seems to have been fixed in Ruby 2.3.
-rw-r--r--railties/test/application/initializers/active_record_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/test/application/initializers/active_record_test.rb b/railties/test/application/initializers/active_record_test.rb
index b62943a278..d823577a3d 100644
--- a/railties/test/application/initializers/active_record_test.rb
+++ b/railties/test/application/initializers/active_record_test.rb
@@ -25,8 +25,8 @@ module ApplicationTests
# ActiveSupport::LogSubscriber.flush_all! in lib/rails/rack/logger.rb blew up in Ruby 2.0
# because it tries to open the database. This behavior doesn't happen in Ruby 1.9.3.
- # However, regardless, the server blew up.
- if RUBY_VERSION >= '2.0.0'
+ # However, regardless, the server blew up. This appears to be fixed in 2.3.0.
+ if RUBY_VERSION >= '2.0.0' && RUBY_VERSION < '2.3.0'
assert_raises (Errno::ENOENT) { get '/foo' }
else
get '/foo'