diff options
author | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2015-04-20 10:12:23 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2015-04-20 10:12:23 -0700 |
commit | 3bb40596c5303d7a7055504e20a53c465c0ac8e4 (patch) | |
tree | 0856aba5ced274ee62bd783140ddb510b149310d /src/ruby/spec | |
parent | b572fcba35fd66cce102b29389a5892d3d45e651 (diff) | |
parent | c85c1ae46330872f83f887eb521ff19967a6bc34 (diff) |
Merge pull request #1313 from tbetbetbe/grpc_ruby_add_ruby_coverage
Add SimpleCov coverage set up for gRPC ruby
Diffstat (limited to 'src/ruby/spec')
-rw-r--r-- | src/ruby/spec/spec_helper.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ruby/spec/spec_helper.rb b/src/ruby/spec/spec_helper.rb index 837d2fc42a..101165c146 100644 --- a/src/ruby/spec/spec_helper.rb +++ b/src/ruby/spec/spec_helper.rb @@ -35,14 +35,18 @@ $LOAD_PATH.unshift(spec_dir) $LOAD_PATH.unshift(lib_dir) $LOAD_PATH.uniq! -require 'faraday' +# set up coverage +require 'simplecov' +SimpleCov.start do + add_filter 'spec' + add_filter 'bin' + SimpleCov.command_name ENV['COVERAGE_NAME'] +end if ENV['COVERAGE_NAME'] + require 'rspec' require 'logging' require 'rspec/logging_helper' -# Allow Faraday to support test stubs -Faraday::Adapter.load_middleware(:test) - # Configure RSpec to capture log messages for each test. The output from the # logs will be stored in the @log_output variable. It is a StringIO instance. RSpec.configure do |config| |