Sha256: 939baf25db3a63dc4cfab8059e45c14fd20228cc0261810deb0dc3d7cb5c04bb
Contents?: true
Size: 1.18 KB
Versions: 1
Compression:
Stored size: 1.18 KB
Contents
require 'pathname' require 'rubygems' require 'backports' require 'spec' require 'dm-core/spec/setup' ENV['ADAPTER'] ||= 'in_memory' SPEC_ROOT = Pathname(__FILE__).dirname.expand_path LIB_ROOT = SPEC_ROOT.parent + 'lib' Pathname.glob((LIB_ROOT + 'dm-core/spec/**/*.rb' ).to_s).each { |file| require file } Pathname.glob((SPEC_ROOT + '{lib,support,*/shared}/**/*.rb').to_s).each { |file| require file } Spec::Runner.configure do |config| config.extend( DataMapper::Spec::Adapters::Helpers) config.include(DataMapper::Spec::PendingHelpers) config.include(DataMapper::Spec::Helpers) config.after :all do DataMapper::Spec.cleanup_models end config.after :all do # global ivar cleanup DataMapper::Spec.remove_ivars(self, instance_variables.reject { |ivar| ivar[0, 2] == '@_' }) end config.after :all do # WTF: rspec holds a reference to the last match for some reason. # When the object ivars are explicitly removed, this causes weird # problems when rspec uses it (!). Why rspec does this I have no # idea because I cannot determine the intention from the code. DataMapper::Spec.remove_ivars(Spec::Matchers.last_matcher, %w[ @expected ]) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ghost_dm-core-1.3.0.beta | spec/spec_helper.rb |