diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6f1dd6867..900caa382 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,8 +1,7 @@ -spec_dir = File.expand_path("..", __FILE__) -lib_dir = File.expand_path("../lib", spec_dir) - -$LOAD_PATH.unshift(lib_dir) +$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__)) $LOAD_PATH.uniq! +require 'rspec' + RSpec.configure do |config| end diff --git a/tasks/spec.rake b/tasks/spec.rake index 858c874f2..7e58adfbd 100644 --- a/tasks/spec.rake +++ b/tasks/spec.rake @@ -29,26 +29,13 @@ namespace :spec do t.rcov = false end t.rcov_opts = %w( - --exclude lib/google/api_client/environment.rb, - lib/compat, - spec, - .rvm/gems, - 1.8/gems, - 1.9/gems, - .rvm, - /Library/Ruby + --exclude gems/ + --exclude spec/ + --exclude lib/google/api_client/environment.rb + --exclude lib/compat ) end - if RCOV_ENABLED - RCov::VerifyTask.new(:verify) do |t| - t.threshold = 65.0 - t.index_html = 'coverage/index.html' - end - - task :verify => :rcov - end - namespace :rcov do desc 'Browse the code coverage report.' task :browse => 'spec:rcov' do