Use simplecov only on ruby 1.9.x

This commit is contained in:
nathanvda 2011-10-12 22:58:46 +02:00
parent e8b98f4453
commit a5c8f4e9a7

View File

@ -1,10 +1,17 @@
# Configure Rails Envinronment # Configure Rails Envinronment
ENV["RAILS_ENV"] = "test" 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 File.expand_path("../dummy/config/environment.rb", __FILE__)
require "rails/test_help" require "rails/test_help"
require "rspec/rails" require "rspec/rails"
require 'simplecov'
ActionMailer::Base.delivery_method = :test ActionMailer::Base.delivery_method = :test
ActionMailer::Base.perform_deliveries = true ActionMailer::Base.perform_deliveries = true