Sha256: 34707a417ed8c0a92af06446302e8c2b0aae8d8140313a83bdd7d12562c03739

Contents?: true

Size: 1.1 KB

Versions: 7

Compression:

Stored size: 1.1 KB

Contents

require 'simplecov'
SimpleCov.start

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

require File.expand_path("../dummy/config/environment.rb",  __FILE__)
require 'rspec/rails'
require 'ffaker'
require 'factory_girl_rails'
require 'capybara/rspec'
require 'remarkable_activerecord'
require 'shoulda-matchers'
require 'database_cleaner'
require 'debugger'
require 'pry-rails'

Rails.backtrace_cleaner.remove_silencers!
ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')

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

RSpec.configure do |config|
  config.color_enabled = true
  config.mock_with :rspec
  config.use_transactional_fixtures = false
  config.infer_base_class_for_anonymous_controllers = true
  config.before(:suite) do
    DatabaseCleaner.strategy = :transaction
    DatabaseCleaner.clean_with(:truncation)
  end

  config.before(:each) do
    DatabaseCleaner.strategy = :transaction
  end

  config.before(:each, :js => true) do
    DatabaseCleaner.strategy = :truncation
  end

  config.before(:each) do
    DatabaseCleaner.start
  end

  config.after(:each) do
    DatabaseCleaner.clean
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
neutral-0.0.7 spec/spec_helper.rb
neutral-0.0.6 spec/spec_helper.rb
neutral-0.0.5 spec/spec_helper.rb
neutral-0.0.4 spec/spec_helper.rb
neutral-0.0.3 spec/spec_helper.rb
neutral-0.0.2 spec/spec_helper.rb
neutral-0.0.1 spec/spec_helper.rb