spec/spec_helper.rb in dm-rest-adapter-1.1.0.rc2 vs spec/spec_helper.rb in dm-rest-adapter-1.1.0.rc3

- old
+ new

@@ -1,29 +1,17 @@ require 'rubygems' require 'pathname' require 'fakeweb' - -# 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) - -# use local dm-validations if running from a typical dev checkout. -lib = File.join('..', '..', 'dm-validations', 'lib') -$LOAD_PATH.unshift(lib) if File.directory?(lib) require 'dm-validations' -# use local dm-serializer if running from a typical dev checkout. -lib = File.join('..', '..', 'dm-serializer', 'lib') -$LOAD_PATH.unshift(lib) if File.directory?(lib) - # Support running specs with 'rake spec' and 'spec' $LOAD_PATH.unshift('lib') unless $LOAD_PATH.include?('lib') require 'dm-rest-adapter' ROOT = Pathname(__FILE__).dirname.parent DataMapper.setup(:default, 'rest://admin:secret@localhost:4000/?format=xml') -Dir[ROOT / 'spec' / 'fixtures' / '**' / '*.rb'].each { |rb| require rb } +Pathname.glob((ROOT + 'spec/fixtures/**/*.rb').to_s).each { |file| require file } FakeWeb.allow_net_connect = false