Merge pull request #1313 from tbetbetbe/grpc_ruby_add_ruby_coverage

Add SimpleCov coverage set up for gRPC ruby
pull/1318/head
Jan Tattermusch 10 years ago
commit 3bb40596c5
  1. 1
      src/ruby/.rspec
  2. 1
      src/ruby/Rakefile
  3. 1
      src/ruby/grpc.gemspec
  4. 12
      src/ruby/spec/spec_helper.rb

@ -1 +1,2 @@
-I.
--require spec_helper

@ -26,6 +26,7 @@ namespace :suite do
SPEC_SUITES.each do |suite|
desc "Run all specs in the #{suite[:title]} spec suite"
RSpec::Core::RakeTask.new(suite[:id]) do |t|
ENV['COVERAGE_NAME'] = suite[:id].to_s
spec_files = []
suite[:files].each { |f| spec_files += Dir[f] } if suite[:files]

@ -29,6 +29,7 @@ Gem::Specification.new do |s|
s.add_dependency 'logging', '~> 1.8'
s.add_dependency 'minitest', '~> 5.4' # reqd for interop tests
s.add_development_dependency 'simplecov', '~> 0.9'
s.add_development_dependency 'bundler', '~> 1.9'
s.add_development_dependency 'rake', '~> 10.4'
s.add_development_dependency 'rake-compiler', '~> 0.9'

@ -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|

Loading…
Cancel
Save