我的 Gemfile 如下
if ENV['TRAVIS']
source 'https://rubygems.org'
else
source 'http://ruby.taobao.org'
end
gem 'rails', '4.0.0'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
gem 'bootstrap-sass', '2.3.2.1'
gem 'devise', '~> 3.0.1'
group :development do
end
group :development, :test do
gem 'sqlite3'
gem 'thin', '~> 1.5.0'
gem 'pry-rails'
gem 'pry-nav'
gem 'guard-rails'
gem 'guard-test'
gem 'guard-zeus'
gem 'guard-livereload', '~> 2.0.1'
end
group :production do
gem 'pg'
gem 'rails_12factor'
gem 'rails_log_stdout', github: 'heroku/rails_log_stdout'
gem 'rails3_serve_static_assets', github: 'heroku/rails3_serve_static_assets'
end
使用 rake test 的时候所有测试用例都可以顺利通过,使用 guard-test 的时候,有如下提示:
08:38:40 - INFO - Run Test
08:38:40 - INFO - Running all tests
/home/richardma/.rvm/gems/ruby-1.9.3-p194/gems/minitest-4.7.5/lib/minitest/unit.rb:1037:in `block in process_args': invalid option: --use-color (OptionParser::InvalidOption)
from /home/richardma/.rvm/gems/ruby-1.9.3-p194/gems/minitest-4.7.5/lib/minitest/unit.rb:1016:in `new'
from /home/richardma/.rvm/gems/ruby-1.9.3-p194/gems/minitest-4.7.5/lib/minitest/unit.rb:1016:in `process_args'
from /home/richardma/.rvm/gems/ruby-1.9.3-p194/gems/minitest-4.7.5/lib/minitest/unit.rb:1066:in `_run'
from /home/richardma/.rvm/gems/ruby-1.9.3-p194/gems/minitest-4.7.5/lib/minitest/unit.rb:1059:in `run'
from /home/richardma/.rvm/gems/ruby-1.9.3-p194/gems/minitest-4.7.5/lib/minitest/unit.rb:795:in `block in autorun'
一直没找到 gurad 测试报错的原因,求各位帮忙。