Sha256: 84efa60a552307d3290c35f38c2782bfb003a9b901e34f0dc2f6712ce4dc2f8f

Contents?: true

Size: 1.21 KB

Versions: 4

Compression:

Stored size: 1.21 KB

Contents

# Configure Rails Envinronment
ENV['RAILS_ENV'] = 'test'

require 'simplecov'
require 'simplecov-summary'
require 'coveralls'

# require "codeclimate-test-reporter"
formatters = [SimpleCov::Formatter::HTMLFormatter]

formatters << Coveralls::SimpleCov::Formatter # if ENV['TRAVIS']
# formatters << CodeClimate::TestReporter::Formatter # if ENV['CODECLIMATE_REPO_TOKEN'] && ENV['TRAVIS']

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[*formatters]

Coveralls.wear!
SimpleCov.start 'rails' do
  add_filter 'spec'

  at_exit {}
end

# CodeClimate::TestReporter.configure do |config|
#  config.logger.level = Logger::WARN
# end
# CodeClimate::TestReporter.start

require 'bundler/setup'
require 'celluloid_pubsub'

RSpec.configure do |config|
  require 'rspec/expectations'
  config.include RSpec::Matchers

  config.mock_with :mocha

  config.after(:suite) do
    if SimpleCov.running
      silence_stream(STDOUT) do
        SimpleCov::Formatter::HTMLFormatter.new.format(SimpleCov.result)
      end

      SimpleCov::Formatter::SummaryFormatter.new.format(SimpleCov.result)
    end
  end
end

# class used for testing actions
class TestActor
  include Celluloid
  include Celluloid::Logger
end

TestActor.supervise_as(:test_actor)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
celluloid_pubsub-0.2.0 spec/spec_helper.rb
celluloid_pubsub-0.1.0 spec/spec_helper.rb
celluloid_pubsub-0.0.22 spec/spec_helper.rb
celluloid_pubsub-0.0.21 spec/spec_helper.rb