]> source.dussan.org Git - redmine.git/commitdiff
Make sure setting is not changed in test.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 18 Dec 2011 10:41:45 +0000 (10:41 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 18 Dec 2011 10:41:45 +0000 (10:41 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8281 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/helpers/application_helper_test.rb

index 2b9d3848df98829a8c43f0b814e18e8f4921e6e8..ef649aeeb923bd9398e9df4385951d95131185e8 100644 (file)
@@ -787,10 +787,10 @@ RAW
   end
 
   def test_default_formatter
-    Setting.text_formatting = 'unknown'
-    text = 'a *link*: http://www.example.net/'
-    assert_equal '<p>a *link*: <a href="http://www.example.net/">http://www.example.net/</a></p>', textilizable(text)
-    Setting.text_formatting = 'textile'
+    with_settings :text_formatting => 'unknown' do
+      text = 'a *link*: http://www.example.net/'
+      assert_equal '<p>a *link*: <a href="http://www.example.net/">http://www.example.net/</a></p>', textilizable(text)
+    end
   end
 
   def test_due_date_distance_in_words