Permalink
Browse files

Fix order dependent tests

Restore default ActiveSupport::XmlMini.backend after tests
  • Loading branch information...
amatsuda committed Jul 25, 2013
1 parent 64202ab commit c48cbb02d7e6f585e31b404c0c363f0d6b586811
Showing with 10 additions and 2 deletions.
  1. +10 −2 activesupport/test/xml_mini_test.rb
@@ -106,7 +106,11 @@ module LibXML end
module Nokogiri end
setup do
- @xml = ActiveSupport::XmlMini
+ @xml, @default_backend = ActiveSupport::XmlMini, ActiveSupport::XmlMini.backend
+ end
+
+ teardown do
+ ActiveSupport::XmlMini.backend = @default_backend
end
test "#with_backend should switch backend and then switch back" do
@@ -135,7 +139,11 @@ module REXML end
module LibXML end
setup do
- @xml = ActiveSupport::XmlMini
+ @xml, @default_backend = ActiveSupport::XmlMini, ActiveSupport::XmlMini.backend
+ end
+
+ teardown do
+ ActiveSupport::XmlMini.backend = @default_backend
end
test "#with_backend should be thread-safe" do

0 comments on commit c48cbb0

Please sign in to comment.