Sha256: 31a1fd8974b602b52deee79710ff2a4372bbb0a381b1ba550d8bdde921946d26

Contents?: true

Size: 547 Bytes

Versions: 6

Compression:

Stored size: 547 Bytes

Contents

require 'spec_helper'

class VersionSpec
  include New::Version
end

describe New::Version do
  let(:version){ VersionSpec.new }

  before do
    version.version = '1.2.3'
  end

  it 'should set a version' do
    expect(version.version.to_s).to eq '1.2.3'
  end

  it 'should bump the version' do
    version.bump_version :major
    expect(version.version.to_s).to eq '2.2.3'

    version.bump_version :minor
    expect(version.version.to_s).to eq '2.3.3'

    version.bump_version :patch
    expect(version.version.to_s).to eq '2.3.4'
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
new-0.0.6 spec/lib/new/version_spec.rb
new-0.0.5 spec/lib/new/version_spec.rb
new-0.0.4 spec/lib/new/version_spec.rb
new-0.0.3 spec/lib/new/version_spec.rb
new-0.0.2 spec/lib/new/version_spec.rb
new-0.0.0 spec/lib/new/version_spec.rb