test/test_helper.rb in active_fulfillment-1.0.3 vs test/test_helper.rb in active_fulfillment-2.0.0

- old
+ new

@@ -1,36 +1,25 @@ #!/usr/bin/env ruby $:.unshift(File.dirname(__FILE__) + '/../lib') +require 'rubygems' +require 'bundler' +Bundler.setup + require 'test/unit' require 'digest/md5' require 'active_fulfillment' +require 'active_utils' -begin - require 'mocha' -rescue LoadError - require 'rubygems' - require 'mocha' -end +require 'mocha' module Test module Unit class TestCase include ActiveMerchant::Fulfillment LOCAL_CREDENTIALS = ENV['HOME'] + '/.active_merchant/fixtures.yml' unless defined?(LOCAL_CREDENTIALS) DEFAULT_CREDENTIALS = File.dirname(__FILE__) + '/fixtures.yml' unless defined?(DEFAULT_CREDENTIALS) - - def generate_order_id - md5 = Digest::MD5.new - now = Time.now - md5 << now.to_s - md5 << String(now.usec) - md5 << String(rand(0)) - md5 << String($$) - md5 << self.class.name - md5.hexdigest - end def all_fixtures @@fixtures ||= load_fixtures end