From a5c8f4e9a78235219181d7fd37f759401cc766a6 Mon Sep 17 00:00:00 2001 From: nathanvda Date: Wed, 12 Oct 2011 22:58:46 +0200 Subject: [PATCH] Use simplecov only on ruby 1.9.x --- spec/spec_helper.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index efbe0b8..b9fde28 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,10 +1,17 @@ # Configure Rails Envinronment ENV["RAILS_ENV"] = "test" +# only start SimpleCov on ruby 1.9.x +if RUBY_VERSION[0..2].to_f >= 1.9 + require 'simplecov' + SimpleCov.start +end + + require File.expand_path("../dummy/config/environment.rb", __FILE__) require "rails/test_help" require "rspec/rails" -require 'simplecov' + ActionMailer::Base.delivery_method = :test ActionMailer::Base.perform_deliveries = true