Sha256: 616d05c351e39daec41169b3db42d094602066b8bbb3796580892630c3ac2747

Contents?: true

Size: 761 Bytes

Versions: 1

Compression:

Stored size: 761 Bytes

Contents

require 'rubygems'
require 'bundler/setup'
require 'rspec/its'

require 'ranked-model'
require 'pry'

Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each {|f| require f}

# After the DB connection is setup
require 'database_cleaner'

# Uncomment this to see Active Record logging for tests
# ActiveRecord::Base.logger = Logger.new(STDOUT)

RSpec.configure do |config|
  config.mock_with :mocha

  config.before(:suite) do
    DatabaseCleaner.strategy = :transaction
    DatabaseCleaner.clean_with(:truncation)
  end

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

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

end

RSpec::Matchers.define :define_constant do |expected|
  match { |actual| actual.const_defined?(expected) }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ranked-model-0.4.2 spec/spec_helper.rb