Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Getting all specs passing

  • Loading branch information...
commit 757ddbdb32e63586f50b14448516b2f00982818e 1 parent 22e6b8b
@winton authored
View
2  features/ready.feature
@@ -38,9 +38,11 @@ Scenario: Reopen pull request
And I execute gitcycle with "qa pass issue.id"
And I enter "y"
And gitcycle runs
+ And I wait for 5 seconds
And I cd to the user repo
And I checkout master-ticket.id
And I commit something
+ And I wait for 5 seconds
And I execute gitcycle with "ready"
And gitcycle runs
Then output includes
View
5 features/steps/gitcycle_steps.rb
@@ -259,6 +259,11 @@ def type(text)
File.open('README', 'w') {|f| f.write($commit_msg) }
end
+When /^I wait for (.+) seconds/ do |seconds|
+ $stdout.puts "Waiting #{seconds} seconds..."
+ sleep seconds.to_i
+end
+
Then /^gitcycle runs with exit$/ do
$execute.each do |cmd|
lambda { run_gitcycle(cmd) }.should raise_error SystemExit
View
9 lib/gitcycle.rb
@@ -68,9 +68,10 @@ def branch(*args)
end
unless yes?("\nYour work will eventually merge into '#{params['branch[source]']}'. Is this correct?")
- source = params['branch[source]'] = q("What branch would you like to eventually merge into?")
+ params['branch[source]'] = q("What branch would you like to eventually merge into?")
end
+ source = params['branch[source]']
if source.include?('/')
params['branch[home]'], params['branch[source]'] = source.split('/')
params['branch[collab]'] = 1
@@ -247,7 +248,7 @@ def pull(*args)
'create' => 0
)
- if branch['collab']
+ if branch && branch['collab']
# Merge from collab
merge_remote_branch(
:owner => branch['home'],
@@ -273,7 +274,7 @@ def pull(*args)
)
end
- unless branch['collab']
+ unless branch && branch['collab']
# Merge from origin
merge_remote_branch(
:owner => @git_login,
@@ -782,7 +783,7 @@ def merge_remote_branch(options={})
if branches(:remote => true, :match => "#{owner}/#{branch}")
puts "\nMerging remote branch '#{branch}' from '#{owner}/#{repo}'.\n".green
- run("git merge #{owner}/#{branch} -q")
+ run("git merge #{owner}/#{branch}")
fix_conflict(options)
end
Please sign in to comment.
Something went wrong with that request. Please try again.