Sha256: 1f1abe9ab1be10635aec35b71c954abb7a22a230f676caa5a8e183ffc0a77fec
Contents?: true
Size: 950 Bytes
Versions: 2
Compression:
Stored size: 950 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_validations' require 'schema_dev/rspec' require 'database_cleaner' DatabaseCleaner.strategy = :truncation SchemaDev::Rspec.setup_db RSpec.configure do |config| config.before(:each) do DatabaseCleaner.clean end end # avoid deprecation warnings I18n.enforce_available_locales = true 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? ActiveSupport::Dependencies.remove_constant c.name end end SimpleCov.command_name "[Ruby #{RUBY_VERSION} - ActiveRecord #{::ActiveRecord::VERSION::STRING}]"
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
schema_validations-1.1.0 | spec/spec_helper.rb |
schema_validations-1.0.1 | spec/spec_helper.rb |