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

Sun Apr 20 08:50:28 -0700 2008
francois (committer)
Mon Apr 21 13:14:28 -0700 2008
piston / test / unit / svn / repository / test_at.rb
100644 19 lines (15 sloc) 0.675 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require File.dirname(__FILE__) + "/../../../test_helper"
 
class TestSvnRepositoryAt < Test::Unit::TestCase
  def setup
    @repos = Piston::Svn::Repository.new("http://bla.com/svn/repos/trunk")
  end
 
  def test_instantiate_revision_at_head
    Piston::Svn::Revision.expects(:new).with(@repos, "HEAD").returns(:newrev)
    assert_equal :newrev, @repos.at(:head)
  end
 
  def test_instantiate_revision_using_recalled_values
    Piston::Svn::Revision.expects(:new).with(@repos, 9123).returns(:newrev)
    assert_equal :newrev, @repos.at(Piston::Svn::REMOTE_REV => 9123,
                                    Piston::Svn::UUID => "5ecf4fe2-1ee6-0310-87b1-e25e094e27de")
  end
end