Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Commit

Permalink
Expect strings as arguments and to_i the revision.
Browse files Browse the repository at this point in the history
Signed-off-by: François Beausoleil <francois@teksol.info>
  • Loading branch information
Florian Aßmann authored and francois committed Aug 1, 2009
1 parent 93d9a95 commit 40c0bc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/piston/svn/revision.rb
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/unit/svn/revision/test_checkout.rb
Expand Up @@ -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

Expand Down

0 comments on commit 40c0bc4

Please sign in to comment.