Permalink
Browse files

Autoload XmlNode

  • Loading branch information...
1 parent 3ef0e62 commit 66d31f6740a98086e3f5629236eac8cfa358a3b3 @tobi committed Jun 28, 2010
Showing with 8 additions and 5 deletions.
  1. +2 −4 lib/active_shipping.rb
  2. +3 −1 lib/vendor/quantified/lib/quantified.rb
  3. +3 −0 test/test_helper.rb
View
6 lib/active_shipping.rb
@@ -31,10 +31,8 @@
require "active_support/all"
end
-require 'vendor/xml_node/lib/xml_node'
-require 'vendor/quantified/lib/quantified'
-require 'quantified/mass'
-require 'quantified/length'
+autoload :XmlNode, 'vendor/xml_node/lib/xml_node'
+autoload :Quantified, 'vendor/quantified/lib/quantified'
require 'net/https'
require 'active_merchant/common'
View
4 lib/vendor/quantified/lib/quantified.rb
@@ -3,4 +3,6 @@
require 'active_support/all'
require 'bigdecimal'
-require 'quantified/attribute'
+require 'quantified/attribute'
+require 'quantified/mass'
+require 'quantified/length'
View
3 test/test_helper.rb
@@ -5,6 +5,9 @@
require 'active_shipping'
require 'mocha'
+
+XmlNode # trigger autorequire
+
module Test
module Unit
class TestCase

0 comments on commit 66d31f6

Please sign in to comment.