Sha256: fafcc8f6d261807933265e4e22f5b2edce29364cd527a1b7dd21dafeb10538df

Contents?: true

Size: 699 Bytes

Versions: 3

Compression:

Stored size: 699 Bytes

Contents

$: << File.join(File.dirname(__FILE__), "/../lib" )

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

FileUtils.rm(Dir.glob("#{ENV['RAILS_ROOT']}/db/*.db"), :force => true)

# Load the Rails environment and testing framework
require "#{File.dirname(__FILE__)}/app_root/config/environment"
require 'rspec/rails'
require 'database_cleaner'

DatabaseCleaner.strategy = :truncation

# Run the migrations
print "\033[30m" # dark gray text
ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")
print "\033[0m"

RSpec.configure do |config|
  config.use_transactional_fixtures = false
  config.use_instantiated_fixtures  = false
  config.before(:each) do
    DatabaseCleaner.clean
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dusen-0.2.1 spec/rails-3.2/spec_helper.rb
dusen-0.2.0 spec/rails-3.2/spec_helper.rb
dusen-0.1.0 spec/rails-3.2/spec_helper.rb