diff test/unit/.svn/text-base/repository_test.rb.svn-base @ 128:07fa8a8b56a8

Update to Redmine trunk rev 4732
author Chris Cannam
date Wed, 19 Jan 2011 15:04:22 +0000
parents 8661b858af72
children 051f544170fe
line wrap: on
line diff
--- a/test/unit/.svn/text-base/repository_test.rb.svn-base	Thu Jan 13 14:12:06 2011 +0000
+++ b/test/unit/.svn/text-base/repository_test.rb.svn-base	Wed Jan 19 15:04:22 2011 +0000
@@ -62,12 +62,11 @@
   
   def test_should_not_create_with_disabled_scm
     # disable Subversion
-    Setting.enabled_scm = ['Darcs', 'Git']
-    repository = Repository::Subversion.new(:project => Project.find(3), :url => "svn://localhost")
-    assert !repository.save
-    assert_equal I18n.translate('activerecord.errors.messages.invalid'), repository.errors.on(:type)
-    # re-enable Subversion for following tests
-    Setting.delete_all
+    with_settings :enabled_scm => ['Darcs', 'Git'] do
+      repository = Repository::Subversion.new(:project => Project.find(3), :url => "svn://localhost")
+      assert !repository.save
+      assert_equal I18n.translate('activerecord.errors.messages.invalid'), repository.errors.on(:type)
+    end
   end
   
   def test_scan_changesets_for_issue_ids