spec/spec_helper.rb in td-client-0.8.68 vs spec/spec_helper.rb in td-client-0.8.69
- old
+ new
@@ -1,14 +1,22 @@
require 'rubygems'
-if ENV['SIMPLE_COV']
- begin
+begin
+ if defined?(:RUBY_ENGINE) && RUBY_ENGINE == 'ruby'
+ # SimpleCov officially supports MRI 1.9+ only for now
+ # https://github.com/colszowka/simplecov#ruby-version-compatibility
+
require 'simplecov'
- SimpleCov.start do
- add_filter '/spec/'
- end
- rescue LoadError
+ require 'coveralls'
+
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
+ SimpleCov::Formatter::HTMLFormatter,
+ Coveralls::SimpleCov::Formatter
+ ]
+ SimpleCov.start("test_frameworks")
end
+rescue NameError
+ # skip measuring coverage at Ruby 1.8
end
require 'rspec'
require 'webmock/rspec'
WebMock.disable_net_connect!(:allow_localhost => true)