Sha256: 6f09ac2ec4487546aa2d6dbdd0c9e19f19dac8605957bb8944e937e584e5551c

Contents?: true

Size: 832 Bytes

Versions: 24

Compression:

Stored size: 832 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('.gritano/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

24 entries across 24 versions & 1 rubygems

Version Path
gritano-1.0.0 spec/spec_helper.rb
gritano-0.11.2 spec/spec_helper.rb
gritano-0.11.1 spec/spec_helper.rb
gritano-0.11.0 spec/spec_helper.rb
gritano-0.10.3 spec/spec_helper.rb
gritano-0.10.2 spec/spec_helper.rb
gritano-0.10.1 spec/spec_helper.rb
gritano-0.10.0 spec/spec_helper.rb
gritano-0.9.4 spec/spec_helper.rb
gritano-0.9.3 spec/spec_helper.rb
gritano-0.9.2 spec/spec_helper.rb
gritano-0.9.1 spec/spec_helper.rb
gritano-0.9.0 spec/spec_helper.rb
gritano-0.8.1 spec/spec_helper.rb
gritano-0.8.0 spec/spec_helper.rb
gritano-0.7.2 spec/spec_helper.rb
gritano-0.7.1 spec/spec_helper.rb
gritano-0.7.0 spec/spec_helper.rb
gritano-0.6.0 spec/spec_helper.rb
gritano-0.5.4 spec/spec_helper.rb