Sha256: d71d7b467a73f3e4b5e1daef0854ea1692d73cff7ff161d89f2fbdfb0f13e289

Contents?: true

Size: 807 Bytes

Versions: 6

Compression:

Stored size: 807 Bytes

Contents

require 'simplecov'
SimpleCov.start do
  add_filter "/spec/"
end

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'rspec'
require 'gritano-core'
require 'database_cleaner'
require 'active_record'

# 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
    ActiveRecord::Base.establish_connection(YAML::load(File.open('db/development.yml')))
    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

6 entries across 6 versions & 1 rubygems

Version Path
gritano-core-2.0.2 spec/spec_helper.rb
gritano-core-2.0.1 spec/spec_helper.rb
gritano-core-2.0.0 spec/spec_helper.rb
gritano-core-1.1.2 spec/spec_helper.rb
gritano-core-1.1.1 spec/spec_helper.rb
gritano-core-1.1.0 spec/spec_helper.rb