Sha256: 7f686ee586c48757652a88e722e262ef05a50d5c263d0f8a968d14107b8ae1bc
Contents?: true
Size: 906 Bytes
Versions: 7
Compression:
Stored size: 906 Bytes
Contents
# encoding: utf-8 require File.dirname(__FILE__) + '/spec_helper' def set_version(major, minor, patch, build) Backup::Version.stubs(:major).returns(major) Backup::Version.stubs(:minor).returns(minor) Backup::Version.stubs(:patch).returns(patch) Backup::Version.stubs(:build).returns(build) end describe Backup::Version do it 'should return a valid gemspec version' do set_version(1,2,3,false) Backup::Version.gemspec.should == '1.2.3' end it 'should return a valid gemspec version with a build' do set_version(4,5,6,615) Backup::Version.gemspec.should == '4.5.6.build.615' end it 'should return a nicer gemspec output' do set_version(1,2,3,false) Backup::Version.current.should == '1.2.3 / build 0' end it 'should return a nicer gemspec output with build' do set_version(4,5,6,615) Backup::Version.current.should == '4.5.6 / build 615' end end
Version data entries
7 entries across 7 versions & 1 rubygems