Fix order dependent tests

Restore default ActiveSupport::XmlMini.backend after tests
This commit is contained in:
Akira Matsuda 2013-07-26 04:17:00 +09:00
parent 64202abc3d
commit c48cbb02d7
1 changed files with 10 additions and 2 deletions

View File

@ -106,7 +106,11 @@ module XmlMiniTest
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 XmlMiniTest
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