Sha256: 4d67443fadc96320ff2c5f1c113e392b46809bfcb12f056861f4e6515722c144

Contents?: true

Size: 1.08 KB

Versions: 14

Compression:

Stored size: 1.08 KB

Contents

require 'rspec/its'
require 'rspec/collection_matchers'
require 'rake/funnel'
require 'simplecov'
require 'coveralls'
require 'codeclimate-test-reporter'
require 'bundler/setup'
require 'simplecov-teamcity-summary'

SimpleCov.start do
  if Coveralls.will_run?
    external_services = [
      Coveralls::SimpleCov::Formatter,
      CodeClimate::TestReporter::Formatter
    ]
  end

  formatter SimpleCov::Formatter::MultiFormatter[
      SimpleCov::Formatter::HTMLFormatter,
      *external_services
    ]

  coverage_dir('build/coverage')

  at_exit do
    result = SimpleCov.result
    result.format!

    next unless Rake::Funnel::Integration::TeamCity.running?

    SimpleCov::Formatter::TeamcitySummaryFormatter.new.format(result)
    Rake::Funnel::Integration::TeamCity::ServiceMessages.build_status(text: "{build.status.text}, Code Coverage #{result.covered_percent.round(2)}%")
  end
end

# When invoked via the rspec rake task, output needs to by synced.
Rake::Funnel::Integration::SyncOutput.new

RSpec.configure do |config|
  config.expect_with :rspec do |c|
    c.syntax = :expect
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rake-funnel-0.15.0.pre spec/spec_helper.rb
rake-funnel-0.14.0.pre spec/spec_helper.rb
rake-funnel-0.13.0.pre spec/spec_helper.rb
rake-funnel-0.12.0.pre spec/spec_helper.rb
rake-funnel-0.11.0.pre spec/spec_helper.rb
rake-funnel-0.10.0.pre spec/spec_helper.rb
rake-funnel-0.9.1.pre spec/spec_helper.rb
rake-funnel-0.9.0.pre spec/spec_helper.rb
rake-funnel-0.8.0.pre spec/spec_helper.rb
rake-funnel-0.7.0.pre spec/spec_helper.rb
rake-funnel-0.6.1.pre spec/spec_helper.rb
rake-funnel-0.6.0.pre spec/spec_helper.rb
rake-funnel-0.5.0.pre spec/spec_helper.rb
rake-funnel-0.4.0.pre spec/spec_helper.rb