提交 ba8456b5 编写于 作者: M Mislav Marohnić

Port `hub push` tests to cukes

上级 a81e271d
Feature: hub push
Background:
Given I am in "git://github.com/mislav/coral.git" git repo
Scenario: Normal push
When I successfully run `hub push`
Then the git command should be unchanged
Scenario: Push current branch to multiple remotes
Given I am on the "cool-feature" branch
When I successfully run `hub push origin,staging`
Then "git push origin cool-feature" should be run
Then "git push staging cool-feature" should be run
Scenario: Push explicit branch to multiple remotes
When I successfully run `hub push origin,staging,qa cool-feature`
Then "git push origin cool-feature" should be run
Then "git push staging cool-feature" should be run
Then "git push qa cool-feature" should be run
Scenario: Push multiple refs to multiple remotes
When I successfully run `hub push origin,staging master new-feature`
Then "git push origin master new-feature" should be run
Then "git push staging master new-feature" should be run
...@@ -161,34 +161,6 @@ class HubTest < Minitest::Test ...@@ -161,34 +161,6 @@ class HubTest < Minitest::Test
"cherry-pick xoebus@a319d88" "cherry-pick xoebus@a319d88"
end end
def test_push_untouched
assert_forwarded "push"
end
def test_push_two
assert_commands "git push origin cool-feature", "git push staging cool-feature",
"push origin,staging cool-feature"
end
def test_push_current_branch
stub_branch('refs/heads/cool-feature')
assert_commands "git push origin cool-feature", "git push staging cool-feature",
"push origin,staging"
end
def test_push_more
assert_commands "git push origin cool-feature",
"git push staging cool-feature",
"git push qa cool-feature",
"push origin,staging,qa cool-feature"
end
def test_push_multiple_refs
assert_commands "git push origin master new-feature",
"git push staging master new-feature",
"push origin,staging master new-feature"
end
def test_pullrequest_from_branch_tracking_local def test_pullrequest_from_branch_tracking_local
stub_config_value 'push.default', 'upstream' stub_config_value 'push.default', 'upstream'
stub_branch('refs/heads/feature') stub_branch('refs/heads/feature')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册