Sha256: e66ef60e8e8984612a73f674b0090f78781303eb3f745c3f869fa4e12830bf56
Contents?: true
Size: 1.09 KB
Versions: 12
Compression:
Stored size: 1.09 KB
Contents
require "utils" require 'capistrano/recipes/deploy/scm/subversion' class DeploySCMSubversionTest < Test::Unit::TestCase class TestSCM < Capistrano::Deploy::SCM::Subversion default_command "svn" end def setup @config = { :repository => "." } def @config.exists?(name); key?(name); end @source = TestSCM.new(@config) end def test_query_revision revision = @source.query_revision('HEAD') do |o| assert_equal "svn info . -rHEAD", o %Q{Path: rails_2_3 URL: svn+ssh://example.com/var/repos/project/branches/rails_2_3 Repository Root: svn+ssh://example.com/var/repos Repository UUID: 2d86388d-c40f-0410-ad6a-a69da6a65d20 Revision: 2095 Node Kind: directory Last Changed Author: sw Last Changed Rev: 2064 Last Changed Date: 2009-03-11 11:04:25 -0700 (Wed, 11 Mar 2009) } end assert_equal 2095, revision end def test_sync @config[:repository] = "http://svn.github.com/capistrano/capistrano.git" rev = '602' dest = "/var/www" assert_equal "svn switch -q -r602 http://svn.github.com/capistrano/capistrano.git /var/www", @source.sync(rev, dest) end end
Version data entries
12 entries across 12 versions & 2 rubygems