Sha256: daced6cf4a177b6e21ea74c120087e7c99e11db28ee0b26342300240c5253fb3

Contents?: true

Size: 1.12 KB

Versions: 4

Compression:

Stored size: 1.12 KB

Contents

require 'rubygems'

ENV['RAILS_ENV'] = ENV['RACK_ENV'] = 'test'
require File.expand_path('../dummyapp/config/environment', __FILE__)
require 'rspec/rails'
require 'database_cleaner'
require 'genspec'

namespace :dummy do
  load 'spec/dummyapp/Rakefile'
end

Rake::Task['dummy:db:setup'].invoke

Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

RSpec.configure do |config|
  config.include(NotifierHelpers)
  config.include(FixtureHelpers)
  config.include(EncodingHelpers)

  config.color_enabled = true
  config.formatter = 'documentation'

  config.use_transactional_fixtures = true
  config.order = "random"

  config.before(:suite) do
    DatabaseCleaner.strategy = :truncation
  end

  config.before(:each) do
    DatabaseCleaner.start
    DatabaseCleaner.clean
    Rollbar.reset_notifier!
  end

  config.after(:each) do
    DatabaseCleaner.clean
  end
  config.backtrace_exclusion_patterns = [/gems\/rspec-.*/]

  if ENV['SKIP_DUMMY_ROLLBAR'] == 'true'
    config.filter_run(:skip_dummy_rollbar => true)
  else
    config.filter_run_excluding(:skip_dummy_rollbar => true)
  end
end

def local?
  ENV['LOCAL'] == '1'
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rollbar-1.5.3 spec/spec_helper.rb
rollbar-1.5.2 spec/spec_helper.rb
rollbar-1.5.1 spec/spec_helper.rb
rollbar-1.5.0 spec/spec_helper.rb