spec/spec_helper.rb in dm-observer-0.9.11 vs spec/spec_helper.rb in dm-observer-0.10.0

- old
+ new

@@ -1,14 +1,15 @@ -require 'pathname' require 'rubygems' -gem 'rspec', '~>1.2' -require 'spec' - -gem 'dm-core', '0.9.11' +# Use local dm-core if running from a typical dev checkout. +lib = File.join('..', '..', 'dm-core', 'lib') +$LOAD_PATH.unshift(lib) if File.directory?(lib) require 'dm-core' -require Pathname(__FILE__).dirname.parent.expand_path + 'lib/dm-observer' +# Support running specs with 'rake spec' and 'spec' +$LOAD_PATH.unshift('lib') unless $LOAD_PATH.include?('lib') + +require 'dm-observer' def load_driver(name, default_uri) return false if ENV['ADAPTER'] != name.to_s begin