Sha256: b74d7022749412c27df7604c92c4f8c0e0b24795a0db590dddc696eaad42a2ed

Contents?: true

Size: 786 Bytes

Versions: 3

Compression:

Stored size: 786 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_associations'
require 'logger'
require 'schema_dev/rspec'

SchemaDev::Rspec::setup

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

def remove_all_models
    ObjectSpace.each_object(Class) do |c|
      next unless c.ancestors.include? ActiveRecord::Base
      next if c == ActiveRecord::Base
      next if c.name.blank?
      c.destroy_all rescue nil
      ActiveSupport::Dependencies.remove_constant c.name
    end
  end

SimpleCov.command_name "[Ruby #{RUBY_VERSION} - ActiveRecord #{::ActiveRecord::VERSION::STRING}]"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
schema_associations-1.2.7 spec/spec_helper.rb
schema_associations-1.2.6 spec/spec_helper.rb
schema_associations-1.2.5 spec/spec_helper.rb