Sha256: 554693cf197b881e525bd381ecb43a16e38c9f7a8ef57d71b722caefd83a9430

Contents?: true

Size: 888 Bytes

Versions: 1

Compression:

Stored size: 888 Bytes

Contents

require 'simplecov'
require 'simplecov-gem-profile'
SimpleCov.start "gem"

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))

require 'rspec'
require 'active_record'
require 'schema_plus_indexes'
require 'schema_dev/rspec'

SchemaDev::Rspec.setup

Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|f| require f}

RSpec.configure do |config|
  config.include(SchemaPlusIndexesMatchers)
  config.warnings = true
end

def define_schema(config={}, &block)
  ActiveRecord::Migration.suppress_messages do
    ActiveRecord::Schema.define do
      connection.tables.each do |table|
        drop_table table, :force => :cascade
      end
      instance_eval &block
    end
  end
end

SimpleCov.command_name "[ruby #{RUBY_VERSION} - ActiveRecord #{::ActiveRecord::VERSION::STRING} - #{ActiveRecord::Base.connection.adapter_name}]"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
schema_plus_indexes-0.1.2 spec/spec_helper.rb