spec/spec_helper.rb in ruby_ami-1.1.2 vs spec/spec_helper.rb in ruby_ami-1.2.0

- old
+ new

@@ -1,19 +1,24 @@ -require 'simplecov' -require 'simplecov-rcov' -class SimpleCov::Formatter::MergedFormatter - def format(result) - SimpleCov::Formatter::HTMLFormatter.new.format(result) - SimpleCov::Formatter::RcovFormatter.new.format(result) +begin + require 'simplecov' + require 'simplecov-rcov' + class SimpleCov::Formatter::MergedFormatter + def format(result) + SimpleCov::Formatter::HTMLFormatter.new.format(result) + SimpleCov::Formatter::RcovFormatter.new.format(result) + end end + SimpleCov.formatter = SimpleCov::Formatter::MergedFormatter + SimpleCov.start do + add_filter "/vendor/" + end +rescue Exception => e + puts "Couldn't load simplecov" + puts e.message + puts e.backtrace.join("\n") end -SimpleCov.formatter = SimpleCov::Formatter::MergedFormatter -SimpleCov.start do - add_filter "/vendor/" -end require 'ruby_ami' -require 'mocha' require 'countdownlatch' Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|f| require f} include RubyAMI