GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Rubygem
Description: 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.
Homepage: http://piston.rubyforge.org/
Clone URL: git://github.com/francois/piston.git
piston / test / unit / svn / repository / test_at.rb
100644 19 lines (15 sloc) 0.696 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
    recalled_values = {Piston::Svn::REMOTE_REV => 9123, Piston::Svn::UUID => "5ecf4fe2-1ee6-0310-87b1-e25e094e27de"}
    Piston::Svn::Revision.expects(:new).with(@repos, 9123, recalled_values).returns(:newrev)
    assert_equal :newrev, @repos.at(recalled_values)
  end
end