Permalink
Browse files

Expect strings as arguments and to_i the revision.

Signed-off-by: François Beausoleil <francois@teksol.info>
  • Loading branch information...
Florian Aßmann authored and francois committed Jul 22, 2009
1 parent 93d9a95 commit 40c0bc4e3c63aa398d319ec08846538705950e3d
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/piston/svn/revision.rb
  2. +2 −2 test/unit/svn/revision/test_checkout.rb
@@ -26,7 +26,7 @@ def checkout_to(dir)
if answer =~ /Checked out revision (\d+)[.]/ then
if revision == "HEAD" then
@revision = $1.to_i
elsif revision != $1.to_i then
elsif revision.to_i != $1.to_i then
raise InvalidRevision, "Did not get the revision I wanted to checkout. Subversion checked out #{$1}, I wanted #{revision}"
end
else
@@ -16,8 +16,8 @@ def test_head_checkout_to_path
end
def test_specific_revision_checkout_to_path
rev = new_revision(1231)
rev.expects(:svn).with(:checkout, "--revision", 1231, @repos.url, @wcdir).returns("Checked out revision 1231.")
rev = new_revision('1231')
rev.expects(:svn).with(:checkout, "--revision", '1231', @repos.url, @wcdir).returns("Checked out revision 1231.")
rev.checkout_to(@wcdir)
end

0 comments on commit 40c0bc4

Please sign in to comment.