Sha256: c348066876d91213cfbc9c84de9e6494eb7becf7804d90e5a699a57054119774

Contents?: true

Size: 813 Bytes

Versions: 9

Compression:

Stored size: 813 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

  config.order = :random
  Kernel.srand config.seed
end

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ranked-model-0.4.11 spec/spec_helper.rb
ranked-model-0.4.10 spec/spec_helper.rb
ranked-model-0.4.9 spec/spec_helper.rb
ranked-model-0.4.8 spec/spec_helper.rb
ranked-model-0.4.7 spec/spec_helper.rb
ranked-model-0.4.6 spec/spec_helper.rb
ranked-model-0.4.5 spec/spec_helper.rb
ranked-model-0.4.4 spec/spec_helper.rb
ranked-model-0.4.3 spec/spec_helper.rb