Sha256: 85cd4dc2e35351d370083d47c85d7fbabcacfe675e9bb03fa08e78f5ea3bcb2d

Contents?: true

Size: 1.13 KB

Versions: 56

Compression:

Stored size: 1.13 KB

Contents

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

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

  context '#bump' do
    it 'bumps major version' do
      version =  FeduxOrgStdlib::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 =  FeduxOrgStdlib::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 =  FeduxOrgStdlib::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

56 entries across 56 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.7.12 spec/version_management/version_spec.rb
fedux_org-stdlib-0.7.11 spec/version_management/version_spec.rb
fedux_org-stdlib-0.7.10 spec/version_management/version_spec.rb
fedux_org-stdlib-0.7.8 spec/version_management/version_spec.rb
fedux_org-stdlib-0.7.7 spec/version_management/version_spec.rb
fedux_org-stdlib-0.7.6 spec/version_management/version_spec.rb
fedux_org-stdlib-0.7.5 spec/version_management/version_spec.rb
fedux_org-stdlib-0.7.4 spec/version_management/version_spec.rb
fedux_org-stdlib-0.7.3 spec/version_management/version_spec.rb
fedux_org-stdlib-0.7.2 spec/version_management/version_spec.rb
fedux_org-stdlib-0.7.1 spec/version_management/version_spec.rb
fedux_org-stdlib-0.7.0 spec/version_management/version_spec.rb
fedux_org-stdlib-0.6.54 spec/version_management/version_spec.rb
fedux_org-stdlib-0.6.53 spec/version_management/version_spec.rb
fedux_org-stdlib-0.6.52 spec/version_management/version_spec.rb
fedux_org-stdlib-0.6.51 spec/version_management/version_spec.rb
fedux_org-stdlib-0.6.50 spec/version_management/version_spec.rb
fedux_org-stdlib-0.6.48 spec/version_management/version_spec.rb
fedux_org-stdlib-0.6.47 spec/version_management/version_spec.rb
fedux_org-stdlib-0.6.46 spec/version_management/version_spec.rb