Module: GitWorkflow::Callbacks::Styles::Mine::FinishBehaviour

Defined in:
lib/git_workflow/callbacks/styles/mine.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/git_workflow/callbacks/styles/mine.rb', line 29

def self.included(base)
  base.instance_eval do
    include GitWorkflow::Callbacks::PivotalTrackerSupport
    include GitWorkflow::Callbacks::TestCodeSupport
    include GitWorkflow::Callbacks::RemoteGitBranchSupport
  end
end

Instance Method Details

#finish(story, branch_name) ⇒ Object



37
38
39
40
41
42
43
44
45
46
# File 'lib/git_workflow/callbacks/styles/mine.rb', line 37

def finish(story, branch_name)
  in_git_branch(story.branch_name) do
    run_tests!(:spec, :features)
  end
  in_git_branch(branch_name) do
    merge_branch(story.branch_name, branch_name)
    run_tests_with_recovery!(:spec, :features)
    push_current_branch_to(branch_name) if branch_name == 'master'
  end
end