Sha256: 366f83e44920bb54ef745ed9608b21c8f3860316ff04f1fb630312bfa98cb2b7

Contents?: true

Size: 712 Bytes

Versions: 5

Compression:

Stored size: 712 Bytes

Contents

# frozen_string_literal: true

called_from_cli = true
begin
  OpenStudio.getOpenStudioCLI
rescue
  called_from_cli = false
end

if not called_from_cli # cli can't load codecov gem
  require 'simplecov'
  require 'codecov'

  # save to CircleCI's artifacts directory if we're on CircleCI
  if ENV['CI']
    if ENV['CIRCLE_ARTIFACTS']
      dir = File.join(ENV['CIRCLE_ARTIFACTS'], 'coverage')
      SimpleCov.coverage_dir(dir)
    end
    SimpleCov.formatter = SimpleCov::Formatter::Codecov
  else
    SimpleCov.coverage_dir('coverage')
  end
  SimpleCov.start

  require 'minitest/autorun'
  require 'minitest/reporters'

  Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new # spec-like progress
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
urbanopt-cli-0.5.2 example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/minitest_helper.rb
urbanopt-cli-0.5.1 example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/minitest_helper.rb
urbanopt-cli-0.5.0 example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/minitest_helper.rb
urbanopt-cli-0.4.1 example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/minitest_helper.rb
urbanopt-cli-0.4.0 example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/minitest_helper.rb