spec/spec_helper.rb in vcloud-edge_gateway-0.5.0 vs spec/spec_helper.rb in vcloud-edge_gateway-1.0.0
- old
+ new
@@ -1,26 +1,37 @@
-require 'simplecov'
require 'support/integration_helper'
-SimpleCov.profiles.define 'gem' do
- add_filter '/spec/'
- add_filter '/features/'
- add_filter '/vendor/'
+if ENV['COVERAGE']
+ require 'simplecov'
- add_group 'Libraries', '/lib/'
-end
+ SimpleCov.profiles.define 'gem' do
+ add_filter '/spec/'
+ add_filter '/features/'
+ add_filter '/vendor/'
-SimpleCov.start 'gem'
+ add_group 'Libraries', '/lib/'
+ end
+ SimpleCov.start 'gem'
+end
+
require 'bundler/setup'
require 'vcloud/edge_gateway'
+require 'vcloud/tools/tester'
+RSpec.configure do |config|
+ config.expect_with :rspec do |c|
+ c.syntax = :expect
+ end
+end
-SimpleCov.at_exit do
- SimpleCov.result.format!
- # do not change the coverage percentage, instead add more unit tests to fix coverage failures.
- if SimpleCov.result.covered_percent < 90
- print "ERROR::BAD_COVERAGE\n"
- print "Coverage is less than acceptable limit(90%). Please add more tests to improve the coverage\n"
- exit(1)
+if ENV['COVERAGE']
+ SimpleCov.at_exit do
+ SimpleCov.result.format!
+ # do not change the coverage percentage, instead add more unit tests to fix coverage failures.
+ if SimpleCov.result.covered_percent < 90
+ print "ERROR::BAD_COVERAGE\n"
+ print "Coverage is less than acceptable limit(90%). Please add more tests to improve the coverage\n"
+ exit(1)
+ end
end
end