Sha256: c4f82a649b98e51251a4c8d340216397bbd1e83a9edff39d68d683ce4c0f2f1d
Contents?: true
Size: 1.44 KB
Versions: 15
Compression:
Stored size: 1.44 KB
Contents
describe MetadataJsonLint::VersionRequirement do describe '.new' do it { expect(described_class.new('')).to be_a(MetadataJsonLint::VersionRequirement) } it { expect(described_class.new('>= 1.0')).to be_a(MetadataJsonLint::VersionRequirement) } it { expect { described_class.new('## 1.0') }.to raise_error(ArgumentError) } end describe '#mixed_syntax?' do it { expect(described_class.new('>= 1.0.0').mixed_syntax?).to be false } it { expect(described_class.new('1.0.x').mixed_syntax?).to be false } it { expect(described_class.new('>= 1.0.0 < 2.0').mixed_syntax?).to be false } it { expect(described_class.new('< 2.0').mixed_syntax?).to be false } it { expect(described_class.new('>= 1.0.x').mixed_syntax?).to be true } it { expect(described_class.new('>= 1.0.*').mixed_syntax?).to be true } it { expect(described_class.new('>= 1.x').mixed_syntax?).to be true } it { expect(described_class.new('>= 1.x.x').mixed_syntax?).to be true } it { expect(described_class.new('>= 1.*').mixed_syntax?).to be true } it { expect(described_class.new('>= 1.0.0 < 2.x').mixed_syntax?).to be true } it { expect(described_class.new('<2.x').mixed_syntax?).to be true } end describe '#open_ended?' do it { expect(described_class.new('>= 1.0 < 2.0').open_ended?).to be false } it { expect(described_class.new('>= 1.0').open_ended?).to be true } it { expect(described_class.new('').open_ended?).to be true } end end
Version data entries
15 entries across 15 versions & 1 rubygems