francois / piston

Piston is a utility that eases vendor branch management. This repository is a complete reimplementation of Piston to provide different backends, depending on the repositories and working copies you pistonize from.

This URL has Read+Write access

piston / test / unit / git / working_copy / test_git_working_copy_existence.rb
1cef7b69 » technicalpickles 2008-04-19 Moving around where tests l... 1 require File.dirname(__FILE__) + "/../../../test_helper"
85ed86b9 » francois 2008-03-15 Implemented Piston::Git::Wo... 2
3 class TestGitWorkingCopyExistence < Test::Unit::TestCase
4 def setup
5 @wcdir = Pathname.new("tmp/wc")
6 @wc = Piston::Git::WorkingCopy.new(@wcdir)
7 end
8
9 def teardown
10 @wcdir.rmtree rescue nil
11 end
12
13 def test_exist_false_when_no_dir
14 deny @wc.exist?
15 end
16
17 def test_exist_true_when_dir_present
18 @wcdir.mkdir
19 assert @wc.exist?
20 end
21 end