aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/xml_mini_test.rb
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2013-07-26 04:17:00 +0900
committerAkira Matsuda <ronnie@dio.jp>2013-07-26 04:17:00 +0900
commitc48cbb02d7e6f585e31b404c0c363f0d6b586811 (patch)
treee910bc71f1a3ed2db7d12688ab6ed99c9e34dbbb /activesupport/test/xml_mini_test.rb
parent64202abc3d15663776b29654e415c2708611e237 (diff)
downloadrails-c48cbb02d7e6f585e31b404c0c363f0d6b586811.tar.gz
rails-c48cbb02d7e6f585e31b404c0c363f0d6b586811.tar.bz2
rails-c48cbb02d7e6f585e31b404c0c363f0d6b586811.zip
Fix order dependent tests
Restore default ActiveSupport::XmlMini.backend after tests
Diffstat (limited to 'activesupport/test/xml_mini_test.rb')
-rw-r--r--activesupport/test/xml_mini_test.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/activesupport/test/xml_mini_test.rb b/activesupport/test/xml_mini_test.rb
index a025279e16..d992028323 100644
--- a/activesupport/test/xml_mini_test.rb
+++ b/activesupport/test/xml_mini_test.rb
@@ -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