spec/spec_helper.rb in log_switch-0.1.2 vs spec/spec_helper.rb in log_switch-0.1.3

- old
+ new

@@ -1,18 +1,20 @@ -require 'simplecov' -require 'simplecov-rcov-text' +if RUBY_VERSION > '1.9' + require 'simplecov' + require 'simplecov-rcov-text' -class SimpleCov::Formatter::MergedFormatter - def format(result) - SimpleCov::Formatter::HTMLFormatter.new.format(result) - SimpleCov::Formatter::RcovTextFormatter.new.format(result) + class SimpleCov::Formatter::MergedFormatter + def format(result) + SimpleCov::Formatter::HTMLFormatter.new.format(result) + SimpleCov::Formatter::RcovTextFormatter.new.format(result) + end end -end -SimpleCov.formatter = SimpleCov::Formatter::MergedFormatter + SimpleCov.formatter = SimpleCov::Formatter::MergedFormatter -SimpleCov.start do - add_filter "/spec" + SimpleCov.start do + add_filter "/spec" + end end $:.unshift(File.dirname(__FILE__) + '/../lib') require 'log_switch'