Sha256: fbc4babeb5fafe72949fa0955187d0b3c642f007f007c7840fbb6d19bc7d7368
Contents?: true
Size: 1.07 KB
Versions: 2
Compression:
Stored size: 1.07 KB
Contents
require 'spec_helper' require 'anvil/versioner' describe Anvil::Versioner do subject { described_class.new('1.2.3-alpha.1+build.2') } describe '#major!' do it 'bumps the major version and resets the others' do expect(subject.major!).to eq('2.0.0') end end describe '#minor!' do it 'bumps minor term and resets patch, pre and build' do expect(subject.minor!).to eq('1.3.0') end end describe '#patch!' do it 'bumps the patch term and resets the pre and build' do expect(subject.patch!).to eq('1.2.4') end end describe '#pre' do it 'bumps the pre-release version and resets the build' do expect(subject.pre!).to eq('1.2.3-alpha.2') end end describe '#build!' do it 'bumps the build version' do expect(subject.build!).to eq('1.2.3-alpha.1+build.3') end end describe '#increment!' do context 'if the term doesnt exist' do it 'raise an exception' do expect do subject.bump!(:foo) end.to raise_error(Anvil::Versioner::NotSupportedTerm) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
anvil-core-0.6.0 | spec/lib/anvil/versioner_spec.rb |
anvil-core-0.5.0 | spec/lib/anvil/versioner_spec.rb |