Sha256: c7f26e5f07e4859e35bbcc94c790bcb4151bb7efdf34ec9b683a4bee4d130faa

Contents?: true

Size: 1.19 KB

Versions: 56

Compression:

Stored size: 1.19 KB

Contents

# encoding: utf-8
require 'spec_helper'
require 'fedux_org_stdlib/version_management/software_version'

RSpec.describe FeduxOrgStdlib::VersionManagement::SoftwareVersion do
  context '#to_s' do
    it 'returns a string representation of version' do
      version = FeduxOrgStdlib::VersionManagement::SoftwareVersion.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 =  FeduxOrgStdlib::VersionManagement::SoftwareVersion.new('1.1.1')
      version.update('2.0.0')
    end
  end

  context '#bump' do
    it 'bumps major version' do
      version =  FeduxOrgStdlib::VersionManagement::SoftwareVersion.new('1.1.1')
      version = version.bump(:major)

      expect(version.to_s).to eq('2.0.0')
    end

    it 'bumps minor version' do
      version =  FeduxOrgStdlib::VersionManagement::SoftwareVersion.new('1.1.1')
      version = version.bump(:minor)

      expect(version.to_s).to eq('1.2.0')
    end

    it 'bumps tiny version' do
      version =  FeduxOrgStdlib::VersionManagement::SoftwareVersion.new('1.1.1')
      version = version.bump(:tiny)

      expect(version.to_s).to eq('1.1.2')
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.10.6 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.10.5 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.10.4 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.10.3 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.10.2 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.10.1 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.10.0 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.9.8 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.9.7 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.9.6 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.9.5 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.9.4 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.9.2 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.9.1 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.9.0 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.8.11 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.8.10 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.8.9 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.8.8 spec/version_management/software_version_spec.rb
fedux_org-stdlib-0.8.7 spec/version_management/software_version_spec.rb