Skip to content

Commit

Permalink
Added failing test case demonstrating #21
Browse files Browse the repository at this point in the history
  • Loading branch information
MadsNielsen committed Oct 5, 2018
1 parent 632f0f8 commit 22570ce
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions spec/plusbump_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@
it "should increment major from first commit" do
expect(PlusBump.bump("e318c48368febb79309e7c371d99bb49fdd5f900", nil)).to eq("1.0.0")
end
it "should increment to major when used against 0.1.*" do
it "should increment to major when used against 0.1.* and not be 0.1.0" do
expect(PlusBump.bump(nil, "0.1.")).not_to eq("0.1.0")
end
it "should increment to major when used against 0.1.*" do
expect(PlusBump.bump(nil, "0.1.")).to eq("1.0.0")
end
it "should increment to 1.0.0 when no tag found" do
expect(PlusBump.bump(nil, "not_found")).to eq("1.0.0")
end
end
it "should incremment to 3.0.0 when semver is prefix" do
expect(PlusBump.bump(nil, "2")).to eq("3.0.0")
end
end
end

0 comments on commit 22570ce

Please sign in to comment.