Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use branch --contains instead of describe and filter tags by checking…
… to see if the tag is contained by the current branch Conflicts: lib/thor-scmversion/git_version.rb
- Loading branch information
Showing
2 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require 'spec_helper' | ||
|
||
module ThorSCMVersion | ||
describe GitVersion do | ||
it "should detect if a commit is contained on a given branch" do | ||
ShellUtils.stub(:sh).and_return(<<OUT) | ||
* constrain_bump_to_branch | ||
master | ||
OUT | ||
expect(GitVersion.contained_in_current_branch?('0.0.1')).to be_true | ||
end | ||
end | ||
end |