I just overtook a new project and the rake test
produces a lot of gibberish output. Why is that the case? I tried removing all gems I don't know, but still my output is clouded. I am calling the test suite via bundle exec rake test
.
Sample output - it's pages of this kind of stuff.
/Users/hendricius/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22.5/lib/active_support/file_update_checker.rb:98: warning: File.exists? is a deprecated name,
use File.exist? instead
/Users/hendricius/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22.5/lib/active_support/file_update_checker.rb:98: warning: File.exists? is a deprecated name,
use File.exist? instead
/Users/hendricius/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22.5/lib/active_support/file_update_checker.rb:98: warning: File.exists? is a deprecated name,
use File.exist? instead
/Users/hendricius/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22.5/lib/active_support/file_update_checker.rb:98: warning: File.exists? is a deprecated name,
use File.exist? instead
The ruby version from the .ruby-version
file is 2.2.2
. The installed rails version is 3.2.22.5
.
My test gems are:
group :test, :development do
# gem 'rack-mini-profiler'
# gem 'minitest'
gem 'minitest-rails'
gem 'test-unit'
gem 'shoulda'
gem 'shoulda-matchers'
gem 'fabrication'
gem 'byebug'
end
I then double checked my Rakefile
. It has the following content:
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
WooWoop::Application.load_tasks
task default: [:test]
The only other thing I could imagine would be my test_helper
. I pasted the contents below. It looks good.
ENV["RAILS_ENV"] = "test"
require File.expand_path("../../config/environment", __FILE__)
require "rails/test_help"
require "minitest/rails"
require "minitest/pride"
require 'shoulda'
require 'shoulda/matchers'
# $VERBOSE=nil
# ActiveRecord::Migration.check_pending!
ActiveSupport::TestCase.test_order = :random
# Protractor test or even some dirty debugging in the rails console on test environment
# might have left some garbage on the DB. Lets make sure we start with a clean state.
# parses the response and returns it.
The only way I can silence the output is if I use RUBYOPT=W0 TEST=test/unit/shop_test.rb be rake test
. Is that the only way since I am using rails 3 still?
Aucun commentaire:
Enregistrer un commentaire