Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Prepare to release v0.9.0 * Use dev flag to indicate dev/release versions
- Loading branch information
1 parent
6b5c6f2
commit 3cb985f
Showing
3 changed files
with
41 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ coverage | |
.ruby-version | ||
.tool-versions | ||
NOTES | ||
*.swp |
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 |
---|---|---|
@@ -1,13 +1,34 @@ | ||
describe Errbit::VERSION do | ||
subject { Errbit::Version.new.full_version } | ||
let(:version) { '0.0.0' } | ||
|
||
it 'handles a missing commit sha' do | ||
allow(ENV).to receive(:[]).with('SOURCE_VERSION') { nil } | ||
expect(subject).to end_with('dev') | ||
context "release version" do | ||
subject { Errbit::Version.new(version).full_version } | ||
|
||
it 'generates a release version' do | ||
expect(subject).to eq(version) | ||
end | ||
|
||
it 'does not use a commit sha' do | ||
allow(ENV).to receive(:[]).with('SOURCE_VERSION') { 'abcd1234efgh56789' } | ||
expect(subject).to eq(version) | ||
end | ||
end | ||
|
||
it 'shortens a present commit sha' do | ||
allow(ENV).to receive(:[]).with('SOURCE_VERSION') { 'abcd1234efgh56789' } | ||
expect(subject).to end_with('dev-abcd1234') | ||
context "dev version" do | ||
subject { Errbit::Version.new(version, true).full_version } | ||
|
||
it 'generates a dev version' do | ||
expect(subject).to end_with('dev') | ||
end | ||
|
||
it 'handles a missing commit sha' do | ||
allow(ENV).to receive(:[]).with('SOURCE_VERSION') { nil } | ||
expect(subject).to end_with('dev') | ||
end | ||
|
||
it 'shortens a present commit sha' do | ||
allow(ENV).to receive(:[]).with('SOURCE_VERSION') { 'abcd1234efgh56789' } | ||
expect(subject).to end_with('dev-abcd1234') | ||
end | ||
end | ||
end |