Sha256: 7ded96677859b718cfa5598e25c28aa32df5c01d5990071c64467a72be148072

Contents?: true

Size: 826 Bytes

Versions: 13

Compression:

Stored size: 826 Bytes

Contents

require 'simplecov'
SimpleCov.start do
  add_filter "/features/"
  add_filter "/spec/"
end
 
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'rspec'
require 'database_cleaner'
require 'active_record'
require 'gritano'

# 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/database.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

13 entries across 13 versions & 1 rubygems

Version Path
gritano-0.4.1 spec/spec_helper.rb
gritano-0.4.0 spec/spec_helper.rb
gritano-0.3.2 spec/spec_helper.rb
gritano-0.3.0 spec/spec_helper.rb
gritano-0.2.2 spec/spec_helper.rb
gritano-0.2.1 spec/spec_helper.rb
gritano-0.2.0 spec/spec_helper.rb
gritano-0.1.7 spec/spec_helper.rb
gritano-0.1.6 spec/spec_helper.rb
gritano-0.1.5 spec/spec_helper.rb
gritano-0.1.4 spec/spec_helper.rb
gritano-0.1.3 spec/spec_helper.rb
gritano-0.1.2 spec/spec_helper.rb