Sha256: c2cbac1640f41ea19c3f578933a25cdf559d48d3961fcc431762ffa0d01fa8f7
Contents?: true
Size: 1.94 KB
Versions: 16
Compression:
Stored size: 1.94 KB
Contents
begin require 'simplecov' require 'codeclimate-test-reporter' SimpleCov.start do add_filter '/spec/' formatter SimpleCov::Formatter::MultiFormatter.new([ SimpleCov::Formatter::HTMLFormatter, CodeClimate::TestReporter::Formatter ]) end rescue LoadError end require 'rubygems' ENV['RAILS_ENV'] = ENV['RACK_ENV'] = 'test' require File.expand_path('../dummyapp/config/environment', __FILE__) require 'rspec/rails' require 'database_cleaner' begin require 'webmock/rspec' WebMock.disable_net_connect!(:allow => 'codeclimate.com') rescue LoadError end namespace :dummy do load 'spec/dummyapp/Rakefile' end if ENV['TRAVIS_JDK_VERSION'] == 'oraclejdk7' require 'rollbar/configuration' Rollbar::Configuration::DEFAULT_ENDPOINT = 'https://api-alt.rollbar.com/api/1/item/' end if Gem::Version.new(Rails.version) < Gem::Version.new('5.0') Rake::Task['dummy:db:setup'].invoke else Rake::Task['dummy:db:test:prepare'].invoke end Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } RSpec.configure do |config| config.extend(Helpers) config.include(NotifierHelpers) config.include(FixtureHelpers) config.include(EncodingHelpers) config.color = true config.formatter = 'documentation' config.use_transactional_fixtures = true config.order = 'random' config.expect_with(:rspec) do |c| c.syntax = [:should, :expect] end config.mock_with :rspec do |mocks| mocks.syntax = [:should, :expect] end config.before(:suite) do DatabaseCleaner.strategy = :truncation end config.before(:each) do DatabaseCleaner.start DatabaseCleaner.clean Rollbar.clear_notifier! stub_request(:any, /api.rollbar.com/).to_rack(RollbarAPI.new) if defined?(WebMock) end config.after do DatabaseCleaner.clean end config.infer_spec_type_from_file_location! if config.respond_to?(:infer_spec_type_from_file_location!) config.backtrace_exclusion_patterns = [/gems\/rspec-.*/] end
Version data entries
16 entries across 16 versions & 1 rubygems