Sha256: 722417dbcf9f674c885d12dcbf0748d162e0599054da013c8d1732c545596f17

Contents?: true

Size: 1.33 KB

Versions: 56

Compression:

Stored size: 1.33 KB

Contents

require 'spec_helper'
require 'gris/version'

describe Gris::Version do
  context '#major_bump' do
    it 'should set the major revision value, and the rest should be 0' do
      stub_const('Gris::VERSION', '1.2.3')
      expect(Gris::Version.next_major).to eq('2.0.0')
    end

    it 'should set the major revision value, and the rest should be 0' do
      stub_const('Gris::VERSION', '5.0.0')
      expect(Gris::Version.next_major).to eq('6.0.0')
    end
  end

  context '#minor_bump' do
    it 'should set the minor revision value, leaving the major value unchanged and the patch value to 0' do
      stub_const('Gris::VERSION', '1.2.3')
      expect(Gris::Version.next_minor).to eq('1.3.0')
    end

    it 'should set the minor revision value, leaving the major value unchanged and the patch value to 0' do
      stub_const('Gris::VERSION', '0.5.0')
      expect(Gris::Version.next_minor).to eq('0.6.0')
    end
  end

  context 'patch_bump' do
    it 'should set the patch revision value, leaving the major and minor values unchanged' do
      stub_const('Gris::VERSION', '1.2.3')
      expect(Gris::Version.next_patch).to eq('1.2.4')
    end

    it 'should set the patch revision value, leaving the major and minor values unchanged' do
      stub_const('Gris::VERSION', '5.5.5')
      expect(Gris::Version.next_patch).to eq('5.5.6')
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
gris-0.4.6 spec/version_spec.rb
gris-0.4.5 spec/version_spec.rb
gris-0.4.4 spec/version_spec.rb
gris-0.4.3 spec/version_spec.rb
gris-0.4.2 spec/version_spec.rb
gris-0.4.0 spec/version_spec.rb
gris-0.3.9 spec/version_spec.rb
gris-0.3.8 spec/version_spec.rb
gris-0.3.7 spec/version_spec.rb
gris-0.3.6 spec/version_spec.rb
gris-0.3.4 spec/version_spec.rb
gris-0.3.3 spec/version_spec.rb
gris-0.3.2 spec/version_spec.rb
gris-0.3.1 spec/version_spec.rb
gris-0.3.0 spec/version_spec.rb
gris-0.2.4 spec/version_spec.rb
gris-0.2.3 spec/version_spec.rb
gris-0.2.2 spec/version_spec.rb
gris-0.2.1 spec/version_spec.rb
gris-0.2.0 spec/version_spec.rb