git_reflow 0.8.4 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Appraisals +1 -1
- data/Gemfile.lock +17 -17
- data/git_reflow.gemspec +1 -1
- data/lib/git_reflow/config.rb +1 -1
- data/lib/git_reflow/git_helpers.rb +2 -2
- data/lib/git_reflow/git_server/bit_bucket/pull_request.rb +1 -1
- data/lib/git_reflow/git_server/git_hub/pull_request.rb +11 -10
- data/lib/git_reflow/git_server/pull_request.rb +18 -4
- data/lib/git_reflow/rspec/command_line_helpers.rb +9 -9
- data/lib/git_reflow/version.rb +1 -1
- data/lib/git_reflow/workflow.rb +6 -1
- data/lib/git_reflow/workflows/core.rb +1 -3
- data/lib/git_reflow/workflows/flat_merge.rb +10 -0
- data/lib/git_reflow.rb +9 -1
- metadata +7 -70
- data/spec/fixtures/git/git_config +0 -7
- data/spec/fixtures/issues/comment.json.erb +0 -27
- data/spec/fixtures/issues/comments.json +0 -29
- data/spec/fixtures/issues/comments.json.erb +0 -15
- data/spec/fixtures/pull_requests/comment.json.erb +0 -45
- data/spec/fixtures/pull_requests/comments.json +0 -47
- data/spec/fixtures/pull_requests/comments.json.erb +0 -15
- data/spec/fixtures/pull_requests/commits.json +0 -29
- data/spec/fixtures/pull_requests/external_pull_request.json +0 -145
- data/spec/fixtures/pull_requests/pull_request.json +0 -142
- data/spec/fixtures/pull_requests/pull_request.json.erb +0 -142
- data/spec/fixtures/pull_requests/pull_request_exists_error.json +0 -32
- data/spec/fixtures/pull_requests/pull_requests.json +0 -136
- data/spec/fixtures/repositories/commit.json +0 -53
- data/spec/fixtures/repositories/commit.json.erb +0 -53
- data/spec/fixtures/repositories/commits.json.erb +0 -13
- data/spec/fixtures/repositories/statuses.json +0 -31
- data/spec/lib/git_reflow/config_spec.rb +0 -74
- data/spec/lib/git_reflow/git_helpers_spec.rb +0 -182
- data/spec/lib/git_reflow/git_server_spec.rb +0 -101
- data/spec/lib/git_reflow/workflow_spec.rb +0 -56
- data/spec/lib/git_reflow/workflows/core_spec.rb +0 -665
- data/spec/lib/git_reflow_spec.rb +0 -39
- data/spec/lib/git_server/bit_bucket_spec.rb +0 -81
- data/spec/lib/git_server/git_hub/pull_request_spec.rb +0 -472
- data/spec/lib/git_server/git_hub_spec.rb +0 -221
- data/spec/lib/git_server/pull_request_spec.rb +0 -583
- data/spec/spec_helper.rb +0 -38
- data/spec/support/fake_github.rb +0 -128
- data/spec/support/fixtures.rb +0 -54
- data/spec/support/github_helpers.rb +0 -109
- data/spec/support/web_mocks.rb +0 -39
@@ -1,56 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe GitReflow::Workflow do
|
4
|
-
|
5
|
-
class DummyWorkflow
|
6
|
-
include GitReflow::Workflow
|
7
|
-
end
|
8
|
-
|
9
|
-
let(:workflow) { DummyWorkflow }
|
10
|
-
let(:loader) { double() }
|
11
|
-
|
12
|
-
describe ".current" do
|
13
|
-
subject { GitReflow::Workflow.current }
|
14
|
-
|
15
|
-
before do
|
16
|
-
allow(GitReflow::Workflow).to receive(:load).and_return(loader)
|
17
|
-
end
|
18
|
-
|
19
|
-
context "when no workflow has been set" do
|
20
|
-
before { allow(GitReflow::Config).to receive(:get).with("reflow.workflow").and_return('') }
|
21
|
-
specify { expect( subject ).to eql(GitReflow::Workflows::Core) }
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
describe ".command" do
|
26
|
-
it "creates a class method for a bogus command" do
|
27
|
-
class DummyWorkflow
|
28
|
-
include GitReflow::Workflow
|
29
|
-
end
|
30
|
-
workflow.command :bogus do
|
31
|
-
"Woohoo"
|
32
|
-
end
|
33
|
-
|
34
|
-
expect(DummyWorkflow.bogus).to eql("Woohoo")
|
35
|
-
end
|
36
|
-
|
37
|
-
it "creates a method for a bogus command with arguments" do
|
38
|
-
workflow.command :bogus, arguments: [:feature_branch] do |**params|
|
39
|
-
"Woohoo #{params[:feature_branch]}!"
|
40
|
-
end
|
41
|
-
|
42
|
-
expect(DummyWorkflow.bogus(feature_branch: "donuts")).to eql("Woohoo donuts!")
|
43
|
-
end
|
44
|
-
|
45
|
-
it "creates a class method for a bogus command with default options" do
|
46
|
-
workflow.command :bogus, arguments: [:feature_branch], defaults: {decoration: 'sprinkles'} do |**params|
|
47
|
-
donut_excitement = "Woohoo #{params[:feature_branch]}"
|
48
|
-
donut_excitement += " with #{params[:decoration]}" if params[:decoration]
|
49
|
-
"#{donut_excitement}!"
|
50
|
-
end
|
51
|
-
|
52
|
-
expect(DummyWorkflow.bogus(feature_branch: "donuts")).to eql("Woohoo donuts with sprinkles!")
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
end
|