Sha256: 38ec62fc7b26fee584bb72598c8df42daf10f5c61a9da1cc26ccdacfda17391c

Contents?: true

Size: 1.1 KB

Versions: 1

Compression:

Stored size: 1.1 KB

Contents

ENV['RAILS_ENV'] ||= 'test'

# SimpleCov for offline code coverage generation.
require 'simplecov'
original_process = Process.pid

SimpleCov.start do
  add_filter 'spec/dummy'
end

SimpleCov.at_exit do
  SimpleCov.result.format! if Process.pid == original_process
end

# Coveralls for online code coverage generation.
require 'coveralls'
Coveralls.wear!

# Send code coverage to Code Climate
require "codeclimate-test-reporter"
CodeClimate::TestReporter.start

# This loads the dummy Rails environment.
require File.expand_path('../dummy/config/environment', __FILE__)

require 'kanina'
require 'timecop'

RSpec.configure do |config|
  if config.files_to_run.one?
    config.full_backtrace = true
    # config.formatter = 'documentation' if config.formatters.none?
  end

  # # Turn this on to profile the slowest tests.
  # config.profile_examples = 10

  config.order = :random
  Kernel.srand config.seed

  config.expect_with :rspec do |expectations|
    expectations.syntax = :expect
  end

  config.mock_with :rspec do |mocks|
    mocks.syntax = :expect
    mocks.verify_partial_doubles = true
  end
end

Kanina::Server.start

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kanina-0.6.0 spec/spec_helper.rb