Sha256: 4998679e8732782e6c974fe6286ae6b15b4a5a5e543e4c1063ab9f83dbda5e38

Contents?: true

Size: 817 Bytes

Versions: 38

Compression:

Stored size: 817 Bytes

Contents

module Bizside
  class CoverageLaunch

    def self.load
      if ENV["COVERAGE"].to_s.downcase == 'true' and ENV['ACCEPTANCE_TEST'].to_s.downcase == 'true'
        setup()

        SimpleCov.start 'rails' do
          SimpleCov.command_name(ENV['COMMAND_NAME']) if ENV['COMMAND_NAME']
          SimpleCov.merge_timeout(7200)
        end
      end
    end

    def self.load_from_test_helper
      if ENV["COVERAGE"] == 'true'
        setup()
        SimpleCov.start 'rails'
      end
    end

    def self.setup
      require 'simplecov'
      require 'simplecov-rcov'
      require_relative 'rcov_formatter'
      SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
        SimpleCov::Formatter::HTMLFormatter,
        Coverage::RcovFormatter
      ])
    end
    private_class_method :setup
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
bizside-2.3.9 lib/bizside/coverage/launch.rb
bizside-3.0.3 lib/bizside/coverage/launch.rb
bizside-2.3.8 lib/bizside/coverage/launch.rb
bizside-3.0.2 lib/bizside/coverage/launch.rb
bizside-3.0.1 lib/bizside/coverage/launch.rb
bizside-3.0.0 lib/bizside/coverage/launch.rb
bizside-2.3.7 lib/bizside/coverage/launch.rb
bizside-2.3.6 lib/bizside/coverage/launch.rb
bizside-2.3.5 lib/bizside/coverage/launch.rb
bizside-2.3.4 lib/bizside/coverage/launch.rb
bizside-2.3.3 lib/bizside/coverage/launch.rb
bizside-2.3.2 lib/bizside/coverage/launch.rb
bizside-2.3.1 lib/bizside/coverage/launch.rb
bizside-2.3.0 lib/bizside/coverage/launch.rb
bizside-2.2.3 lib/bizside/coverage/launch.rb
bizside-2.2.2 lib/bizside/coverage/launch.rb
bizside-2.2.1 lib/bizside/coverage/launch.rb
bizside-2.2.0 lib/bizside/coverage/launch.rb
bizside-2.1.12 lib/bizside/coverage/launch.rb
bizside-2.1.11 lib/bizside/coverage/launch.rb