Sha256: 8fd4f9b0957263d846a9b9f9c3e60d3ff3ec3257aa5903cc923691a243f7401d

Contents?: true

Size: 953 Bytes

Versions: 2

Compression:

Stored size: 953 Bytes

Contents

ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../dummy/config/environment", __FILE__)

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'rails/all'
require 'sqlite3'
require 'rspec'
require 'rspec/rails'

require 'factory_girl_rails'
FactoryGirl.definition_file_paths = %w(spec/factories)

require 'database_cleaner'
require 'shoulda-matchers'
require 'acts_as_follower'
require 'private_person'

# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}

RSpec.configure do |config|
  config.before(:suite) do
    DatabaseCleaner.strategy = :transaction
    DatabaseCleaner.clean_with(:deletion)
  end

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
private_person-0.2.4 spec/spec_helper.rb
private_person-0.1.0 spec/spec_helper.rb