spec/coverage_helper.rb in elephas-1.1.1 vs spec/coverage_helper.rb in elephas-1.1.2

- old
+ new

@@ -2,13 +2,14 @@ # # This file is part of the elephas gem. Copyright (C) 2012 and above Shogun <shogun_panda@me.com>. # Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php. # -require "simplecov" require "pathname" -if ENV["ELEPHAS_COVERAGE"] == "TRUE" then +if ENV["ELEPHAS_COVERAGE"] == "TRUE" && RUBY_VERSION >= "1.9" then + require "simplecov" + root = Pathname.new(File.dirname(__FILE__)) + ".." SimpleCov.start do add_filter do |src_file| path = Pathname.new(src_file.filename).relative_path_from(root).to_s \ No newline at end of file