Permalink
Browse files

Only call MiniTest.autorun if the dependecy is present

  • Loading branch information...
1 parent 90c8972 commit e6e3a649820a02d4f12f36dc7298282357a076f4 @rafaelfranca rafaelfranca committed Dec 31, 2012
@@ -1,12 +1,11 @@
-require 'abstract_unit'
-require 'active_support/xml_mini'
-require 'active_support/core_ext/hash/conversions'
-
begin
require 'libxml'
rescue LoadError
# Skip libxml tests
else
+require 'abstract_unit'
+require 'active_support/xml_mini'
+require 'active_support/core_ext/hash/conversions'
class LibxmlEngineTest < ActiveSupport::TestCase
include ActiveSupport
@@ -1,12 +1,11 @@
-require 'abstract_unit'
-require 'active_support/xml_mini'
-require 'active_support/core_ext/hash/conversions'
-
begin
require 'libxml'
rescue LoadError
# Skip libxml tests
else
+require 'abstract_unit'
+require 'active_support/xml_mini'
+require 'active_support/core_ext/hash/conversions'
class LibXMLSAXEngineTest < ActiveSupport::TestCase
include ActiveSupport
@@ -1,12 +1,11 @@
-require 'abstract_unit'
-require 'active_support/xml_mini'
-require 'active_support/core_ext/hash/conversions'
-
begin
require 'nokogiri'
rescue LoadError
# Skip nokogiri tests
else
+require 'abstract_unit'
+require 'active_support/xml_mini'
+require 'active_support/core_ext/hash/conversions'
class NokogiriEngineTest < ActiveSupport::TestCase
include ActiveSupport
@@ -1,12 +1,11 @@
-require 'abstract_unit'
-require 'active_support/xml_mini'
-require 'active_support/core_ext/hash/conversions'
-
begin
require 'nokogiri'
rescue LoadError
# Skip nokogiri tests
else
+require 'abstract_unit'
+require 'active_support/xml_mini'
+require 'active_support/core_ext/hash/conversions'
class NokogiriSAXEngineTest < ActiveSupport::TestCase
include ActiveSupport

0 comments on commit e6e3a64

Please sign in to comment.