require 'pathname'
require 'rubygems'

gem 'rspec', '~>1.1.12'
require 'spec'

gem 'dm-core', '0.10.0'
require 'dm-core'

ADAPTERS = []
def load_driver(name, default_uri)
  begin
    DataMapper.setup(name, ENV["#{name.to_s.upcase}_SPEC_URI"] || default_uri)
    DataMapper::Repository.adapters[:default] = DataMapper::Repository.adapters[name]
    ADAPTERS << name
  rescue LoadError => e
    warn "Could not load do_#{name}: #{e}"
    false
  end
end

load_driver(:postgres, 'postgres://postgres@localhost/dm_core_test')
load_driver(:mysql,    'mysql://localhost/dm_core_test')

require Pathname(__FILE__).dirname.expand_path.parent + 'lib/dm-constraints'

require 'pathname'
require 'rubygems'

gem 'rspec', '>=1.1.12'
require 'spec'

gem 'dm-core', '0.10.0'
require 'dm-core'

ADAPTERS = []
def load_driver(name, default_uri)
  begin
    DataMapper.setup(name, ENV["#{name.to_s.upcase}_SPEC_URI"] || default_uri)
    DataMapper::Repository.adapters[:default] = DataMapper::Repository.adapters[name]
    ADAPTERS << name
  rescue LoadError => e
    warn "Could not load do_#{name}: #{e}"
    false
  end
end

load_driver(:postgres, 'postgres://postgres@localhost/dm_core_test')
load_driver(:mysql,    'mysql://localhost/dm_core_test')

require Pathname(__FILE__).dirname.expand_path.parent + 'lib/dm-constraints'

Use RSpec >= 1.1.12 so 1.2 can be used as well
Use RSpec >= 1.1.12 so 1.2 can be used as well
