]> source.dussan.org Git - redmine.git/commitdiff
scm: filesystem: code clean up unit model test.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 21 May 2011 01:10:47 +0000 (01:10 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 21 May 2011 01:10:47 +0000 (01:10 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5862 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/repository_filesystem_test.rb

index b2f8b84ef45d288bfb0680182ddb70fe1a9d28a5..03a6edea4298b38d08956dcaad372065e10dbbd9 100644 (file)
@@ -26,15 +26,17 @@ class RepositoryFilesystemTest < ActiveSupport::TestCase
   def setup
     @project = Project.find(3)
     Setting.enabled_scm << 'Filesystem' unless Setting.enabled_scm.include?('Filesystem')
-    assert @repository = Repository::Filesystem.create(
-                            :project => @project, :url => REPOSITORY_PATH)
+    @repository = Repository::Filesystem.create(
+                               :project => @project,
+                               :url     => REPOSITORY_PATH
+                                 )
+    assert @repository
   end
 
   if File.directory?(REPOSITORY_PATH)
     def test_fetch_changesets
       @repository.fetch_changesets
       @repository.reload
-
       assert_equal 0, @repository.changesets.count
       assert_equal 0, @repository.changes.count
     end
@@ -47,7 +49,6 @@ class RepositoryFilesystemTest < ActiveSupport::TestCase
     def test_cat
       assert_equal "TEST CAT\n", @repository.scm.cat("test")
     end
-
   else
     puts "Filesystem test repository NOT FOUND. Skipping unit tests !!! See doc/RUNNING_TESTS."
     def test_fake; assert true end