spec/spec_helper.rb in nofxx-money-2.3.3 vs spec/spec_helper.rb in nofxx-money-2.3.5
- old
+ new
@@ -1,14 +1,15 @@
begin
+ require 'rubygems'
require 'spec'
require 'active_record'
rescue LoadError
require 'rubygems'
gem 'rspec'
require 'spec'
end
-require 'active_record'
-$:.unshift(File.dirname(__FILE__) + '/../lib')
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'money'
config = YAML.load_file(File.dirname(__FILE__) + '/db/database.yml')
ActiveRecord::Base.logger = Logger.new("/tmp/money-debug.log")
ActiveRecord::Base.establish_connection(config)