TravisCI Ruby 项目不适用于 rspec

mik*_*keb 1 ruby rspec travis-ci

我有一个用 Ruby 编写的 Logstash 插件,它在 TravisCI 上开始失败,但它在本地工作。任何想法这意味着什么?

$ bundle exec rspec spec

The signal EXIT is in use by the JVM and will not work correctly on this platform

Coverage may be inaccurate; set the "--debug" command line option, or do JRUBY_OPTS="--debug" or set the "debug.fullTrace=true" option in your .jrubyrc

W, [2016-12-02T14:12:20.127000 #5894]  WARN -- :       This usage of the Code Climate Test Reporter is now deprecated. Since version

      1.0, we now require you to run `SimpleCov` in your test/spec helper, and then

      run the provided `codeclimate-test-reporter` binary separately to report your

      results to Code Climate.

      More information here: https://github.com/codeclimate/ruby-test-reporter/blob/master/README.md

The command "bundle exec rspec spec" exited with 1.
Run Code Online (Sandbox Code Playgroud)

从这里:

https://travis-ci.org/mikebski/logstash-filter-datepart

小智 5

正如您在code-climate/ruby-test-reporter CHANGELOG 上看到的,您需要替换测试帮助文件中的这些行(在我的情况下spec/spec_helper.rb):

require 'codeclimate-test-reporter'
CodeClimate::TestReporter.start
Run Code Online (Sandbox Code Playgroud)

对于这些:

require 'simplecov'
SimpleCov.start
Run Code Online (Sandbox Code Playgroud)

从今以后,您还必须codeclimate-test-reporter显式调用。

希望能帮助到你!