Sha256: 55acefbe6c5591f015076568693cc0e0f746fa3c0419f6bdf287cd0f0ac5b7ee

Contents?: true

Size: 788 Bytes

Versions: 1

Compression:

Stored size: 788 Bytes

Contents

# Configure Rails Environment
ENV["RAILS_ENV"] = "test"

require File.expand_path("../dummy/config/environment.rb",  __FILE__)
require "rails/test_help"
require "active_record"
require "pry"
require "pry-debugger"
require "database_cleaner"

#grr-can't make this work quickly
Dir.glob("spec/dummy/spec/factories/*.rb").each do |file|
  puts "loading #{file}"
   load "#{file}"
end
Rails.backtrace_cleaner.remove_silencers!

# force include of our gem

RSpec.configure do |config|
  config.treat_symbols_as_metadata_keys_with_true_values = true

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

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pliable-0.1.0 spec/spec_helper.rb