aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2013-08-17 21:49:16 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2013-08-17 21:49:16 +0530
commit9abe72c7600132aa964ca48c312ef981007ab8b1 (patch)
tree6062ada5e442186cf949df4b9a1502e84bbb0271 /activesupport/test
parentd73232c9c8933b9f3092d5d27b7ffab6ccc0422c (diff)
parentec8ef1e1055c4e1598da13f49d30261f07f4a9b4 (diff)
downloadrails-9abe72c7600132aa964ca48c312ef981007ab8b1.tar.gz
rails-9abe72c7600132aa964ca48c312ef981007ab8b1.tar.bz2
rails-9abe72c7600132aa964ca48c312ef981007ab8b1.zip
Merge branch 'master' of github.com:rails/docrails
Conflicts: actionview/README.rdoc activerecord/lib/active_record/migration.rb guides/source/development_dependencies_install.md guides/source/getting_started.md
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/transliterate_test.rb6
-rw-r--r--activesupport/test/xml_mini_test.rb12
2 files changed, 5 insertions, 13 deletions
diff --git a/activesupport/test/transliterate_test.rb b/activesupport/test/transliterate_test.rb
index e0f85f4e7c..ce91c443e1 100644
--- a/activesupport/test/transliterate_test.rb
+++ b/activesupport/test/transliterate_test.rb
@@ -3,6 +3,7 @@ require 'abstract_unit'
require 'active_support/inflector/transliterate'
class TransliterateTest < ActiveSupport::TestCase
+
def test_transliterate_should_not_change_ascii_chars
(0..127).each do |byte|
char = [byte].pack("U")
@@ -23,13 +24,12 @@ class TransliterateTest < ActiveSupport::TestCase
def test_transliterate_should_work_with_custom_i18n_rules_and_uncomposed_utf8
char = [117, 776].pack("U*") # "ü" as ASCII "u" plus COMBINING DIAERESIS
I18n.backend.store_translations(:de, :i18n => {:transliterate => {:rule => {"ü" => "ue"}}})
- default_locale, I18n.locale = I18n.locale, :de
+ I18n.locale = :de
assert_equal "ue", ActiveSupport::Inflector.transliterate(char)
- ensure
- I18n.locale = default_locale
end
def test_transliterate_should_allow_a_custom_replacement_char
assert_equal "a*b", ActiveSupport::Inflector.transliterate("a索b", "*")
end
+
end
diff --git a/activesupport/test/xml_mini_test.rb b/activesupport/test/xml_mini_test.rb
index d992028323..a025279e16 100644
--- a/activesupport/test/xml_mini_test.rb
+++ b/activesupport/test/xml_mini_test.rb
@@ -106,11 +106,7 @@ module XmlMiniTest
module Nokogiri end
setup do
- @xml, @default_backend = ActiveSupport::XmlMini, ActiveSupport::XmlMini.backend
- end
-
- teardown do
- ActiveSupport::XmlMini.backend = @default_backend
+ @xml = ActiveSupport::XmlMini
end
test "#with_backend should switch backend and then switch back" do
@@ -139,11 +135,7 @@ module XmlMiniTest
module LibXML end
setup do
- @xml, @default_backend = ActiveSupport::XmlMini, ActiveSupport::XmlMini.backend
- end
-
- teardown do
- ActiveSupport::XmlMini.backend = @default_backend
+ @xml = ActiveSupport::XmlMini
end
test "#with_backend should be thread-safe" do