]> source.dussan.org Git - redmine.git/commitdiff
scm: subversion: code clean up unit model test.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 17 Mar 2011 03:53:34 +0000 (03:53 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 17 Mar 2011 03:53:34 +0000 (03:53 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5162 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/repository_subversion_test.rb

index a669b20241b79a03f3cd9661dae50980790f2672..ca3bd9b48d64b392cf9cab6f06a62c234d5fc5de 100644 (file)
@@ -19,13 +19,14 @@ require File.expand_path('../../test_helper', __FILE__)
 
 class RepositorySubversionTest < ActiveSupport::TestCase
   fixtures :projects, :repositories, :enabled_modules, :users, :roles 
-  
+
   def setup
     @project = Project.find(3)
-    assert @repository = Repository::Subversion.create(:project => @project,
+    @repository = Repository::Subversion.create(:project => @project,
              :url => "file://#{self.class.repository_path('subversion')}")
+    assert @repository
   end
-  
+
   if repository_configured?('subversion')
     def test_fetch_changesets_from_scratch
       @repository.fetch_changesets
@@ -35,7 +36,7 @@ class RepositorySubversionTest < ActiveSupport::TestCase
       assert_equal 20, @repository.changes.count
       assert_equal 'Initial import.', @repository.changesets.find_by_revision('1').comments
     end
-    
+
     def test_fetch_changesets_incremental
       @repository.fetch_changesets
       # Remove changesets with revision > 5
@@ -46,7 +47,7 @@ class RepositorySubversionTest < ActiveSupport::TestCase
       @repository.fetch_changesets
       assert_equal 11, @repository.changesets.count
     end
-    
+
     def test_latest_changesets
       @repository.fetch_changesets
       
@@ -76,7 +77,9 @@ class RepositorySubversionTest < ActiveSupport::TestCase
 
     def test_directory_listing_with_square_brackets_in_base
       @project = Project.find(3)
-      @repository = Repository::Subversion.create(:project => @project, :url => "file:///#{self.class.repository_path('subversion')}/subversion_test/[folder_with_brackets]")
+      @repository = Repository::Subversion.create(
+                          :project => @project,
+                          :url => "file:///#{self.class.repository_path('subversion')}/subversion_test/[folder_with_brackets]")
 
       @repository.fetch_changesets
       @repository.reload