Sha256: 37a0e2fe6292a8502122b52bfaee2590c3310425bec0d40e8f3ca19262b3e706
Contents?: true
Size: 1.19 KB
Versions: 3
Compression:
Stored size: 1.19 KB
Contents
#https://github.com/dazuma/versionomy require 'spec_helper' require 'fedux_org/stdlib/version_management/version' describe FeduxOrg::Stdlib::VersionManagement::Version do context '#to_s' do it 'returns a string representation of version' do version = FeduxOrg::Stdlib::VersionManagement::Version.new( '1.1.1' ) expect( version.to_s ).to eq( '1.1.1' ) end end context '#update' do it "updates an with an new version number" do version = FeduxOrg::Stdlib::VersionManagement::Version.new( '1.1.1' ) version.update( '2.0.0' ) end end context '#bump' do it 'bumps major version' do version = FeduxOrg::Stdlib::VersionManagement::Version.new( '1.1.1' ) version = version.bump( :major ) expect( version.to_s ).to eq( '2.0.0' ) end it 'bumps minor version' do version = FeduxOrg::Stdlib::VersionManagement::Version.new( '1.1.1' ) version = version.bump( :minor ) expect( version.to_s ).to eq( '1.2.0' ) end it 'bumps tiny version' do version = FeduxOrg::Stdlib::VersionManagement::Version.new( '1.1.1' ) version = version.bump( :tiny ) expect( version.to_s ).to eq( '1.1.2' ) end end end
Version data entries
3 entries across 3 versions & 1 rubygems