public
Rubygem
Description: Git based distributed ticketing system, including a command line client and web viewer
Clone URL: git://github.com/schacon/ticgit.git
ticgit / spec / ticgit_spec.rb
100644 34 lines (25 sloc) 0.887 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
require File.dirname(__FILE__) + "/spec_helper"
 
describe TicGit do
  include TicGitSpecHelper
  
  before(:all) do
    @path = setup_new_git_repo
    @orig_test_opts = test_opts
    @ticgit = TicGit.open(@path, @orig_test_opts)
  end
  
  it "should create a new branch if it's not there" do
    br = @ticgit.git.branches.map { |b| b.name }
    br.should include('ticgit')
  end
 
  it "should find an existing ticgit branch if it's there" do
    tg = TicGit.open(@path, test_opts)
    @ticgit.git.branches.size.should eql(tg.git.branches.size)
  end
 
  it "should find the .git directory if it's there" do
    @ticgit.git.dir.path.should eql(@path)
  end
 
  it "should look for the .git directory until it finds it" do
    tg = TicGit.open(File.join(@path, 'subdir'), @orig_test_opts)
    tg.git.dir.path.should eql(@path)
  end
  
  it "should add a .hold file to a new branch"
 
end