Sha256: 2280e8053b056d53ac3acbdff2ac9784ef4908932b4778f214484a46d6a7290b
Contents?: true
Size: 1.22 KB
Versions: 55
Compression:
Stored size: 1.22 KB
Contents
require "utils" require 'capistrano/recipes/deploy/scm/darcs' class DeploySCMDarcsTest < Test::Unit::TestCase class TestSCM < Capistrano::Deploy::SCM::Darcs default_command "darcs" end def setup @config = { :repository => "." } # def @config.exists?(name); key?(name); end @source = TestSCM.new(@config) end # We should be able to pick a specific hash. def test_checkout_hash hsh = "*version_hash*" assert_match(%r{--to-match=.hash #{Regexp.quote(hsh)}}, @source.checkout(hsh, "*foo_location*"), "Specifying a revision hash got the --to-match option wrong.") end # Picking the head revision should leave out the hash, because head is the # default and we don't have a HEAD pseudotag def test_checkout_head hsh = @source.head assert_no_match(%r{--to-match}, @source.checkout(hsh, "*foo_location*"), "Selecting the head revision incorrectly produced a --to-match option.") end # Leaving the revision as nil shouldn't break anything. def test_checkout_nil assert_no_match(%r{--to-match}, @source.checkout(nil, "*foo_location*"), "Leaving the revision as nil incorrectly produced a --to-match option.") end end
Version data entries
55 entries across 55 versions & 3 rubygems