From 14a06d96c4a52950df05f1da229bdd42b1246f8e Mon Sep 17 00:00:00 2001 From: Benjamin Fleischer Date: Sun, 8 Nov 2015 23:17:08 -0600 Subject: [PATCH] Only capture stderr on Ruby 2.1 on CI Always show warnings in tests --- .travis.yml | 5 +++-- test/test_helper.rb | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6b91070e..6a014fae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,6 @@ cache: rvm: - 1.9.3 - 2.0.0 - - 2.1 - 2.2 - ruby-head - rbx-2 @@ -17,7 +16,7 @@ install: - bundle install --retry=3 script: - - env CAPTURE_STDERR=false bundle exec rake ci + - env CAPTURE_STDERR=${CAPTURE_STDERR:-false} bundle exec rake ci env: - "RAILS_VERSION=4.0" @@ -27,6 +26,8 @@ env: matrix: include: + - rvm: 2.1 + env: CAPTURE_STDERR=true - rvm: jruby-19mode env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false -Xcli.debug=true --debug' allow_failures: diff --git a/test/test_helper.rb b/test/test_helper.rb index 6a145e1a..9257c24a 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -49,6 +49,8 @@ end if ENV['CAPTURE_STDERR'] !~ /false|1/i require 'capture_warnings' CaptureWarnings.new(_fail_build = true).execute! +else + $VERBOSE = true end require 'active_model_serializers'