Sha256: 00e805a3850ff6109028b99b9321511a3105f9009f9f3fa0ead2a41e1cf900c9
Contents?: true
Size: 1.38 KB
Versions: 3
Compression:
Stored size: 1.38 KB
Contents
require 'spec_helper' module Vim module Flavor describe Version do v = described_class describe '::create' do context 'with a string' do it 'makes a PlainVersion' do expect(v.create('1.2.3')).to be_a(PlainVersion) expect(v.create('v1.2.3')).to be_a(PlainVersion) end end context 'with a branch' do it 'makes a BranchVersion' do r = v.create(branch: 'master') expect(r).to be_a(BranchVersion) expect(r.branch).to be == 'master' expect(r.revision).to be_nil end end context 'with a branch and a ref' do it 'makes a BranchVersion' do r = v.create(branch: 'master', revision: '1' * 40) expect(r).to be_a(BranchVersion) expect(r.branch).to be == 'master' expect(r.revision).to be == '1' * 40 end end end describe '::correct?' do it 'is an alias of PlainVersion::correct?' do expect(v.correct?('1')).to be_true expect(v.correct?('1.2')).to be_true expect(v.correct?('1.2.3')).to be_true expect(v.correct?('v1')).to be_true expect(v.correct?('v1.2')).to be_true expect(v.correct?('v1.2.3')).to be_true expect(v.correct?('vim7.4')).to be_false end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
vim-flavor-2.1.1 | spec/version_spec.rb |
vim-flavor-2.1.0 | spec/version_spec.rb |
vim-flavor-2.0.0 | spec/version_spec.rb |