spec/spec_helper.rb in dm-observer-0.9.7 vs spec/spec_helper.rb in dm-observer-0.9.8

- old
+ new

@@ -1,25 +1,24 @@ +require 'pathname' require 'rubygems' -gem 'rspec', '>=1.1.3' + +gem 'rspec', '~>1.1.11' require 'spec' -gem "dm-core", '~>0.9.7' + +gem 'dm-core', '~>0.9.8' require 'dm-core' -require 'pathname' + require Pathname(__FILE__).dirname.parent.expand_path + 'lib/dm-observer' def load_driver(name, default_uri) return false if ENV['ADAPTER'] != name.to_s - lib = "do_#{name}" - begin - gem lib, '~>0.9.7' - require lib DataMapper.setup(name, ENV["#{name.to_s.upcase}_SPEC_URI"] || default_uri) DataMapper::Repository.adapters[:default] = DataMapper::Repository.adapters[name] true - rescue Gem::LoadError => e - warn "Could not load #{lib}: #{e}" + rescue LoadError => e + warn "Could not load do_#{name}: #{e}" false end end ENV['ADAPTER'] ||= 'sqlite3'