Permalink
Browse files

Fix "accept doesn't honor non-origin remotes"

Accept should now honor non-origin remotes
  • Loading branch information...
woahdae committed Jun 14, 2010
1 parent 96412fe commit b6c1aabc4deab8cc7c8c0d55f03d2c22381ea883
Showing with 3 additions and 2 deletions.
  1. +1 −1 lib/reviewr/cli/accept.rb
  2. +2 −1 spec/reviewr/cli/accept_spec.rb
@@ -8,7 +8,7 @@ def execute
prompt_for_user
project.fetch_review_branch
project.fetch_master
- project.create_review_branch("origin/#{arguments.first}")
+ project.create_review_branch("#{project.remote_repo}/#{arguments.first}")
unless project.rebase_review
output.print "Branch '#{arguments.first}' won't merge cleanly"
@@ -37,7 +37,8 @@ module CLI
end
it "creates a working branch for the reviewed code" do
- project.should_receive(:create_review_branch).with("origin/review")
+ project.should_receive(:remote_repo).and_return("some_other_repo")
+ project.should_receive(:create_review_branch).with("some_other_repo/review")
accept.arguments = ["review"]
accept.call
end

0 comments on commit b6c1aab

Please sign in to comment.