Sha256: dcedd99f5495cbee892f3c32ffd884c421048a74dfd3dca5a990cfeca756a48a
Contents?: true
Size: 1014 Bytes
Versions: 2
Compression:
Stored size: 1014 Bytes
Contents
require 'spec_helper' require 'ore/dependency' describe Dependency do subject { Dependency } describe "parse" do it "should parse a dependency string with only a name" do dep = subject.parse('foo') dep.name.should == 'foo' dep.versions.should == ['>= 0'] end it "should parse a dependency with a version" do dep = subject.parse('foo ~> 1.2.3') dep.name.should == 'foo' dep.versions.should == ['~> 1.2.3'] end end describe "parse_versions" do it "should parse a single version" do dep = subject.parse_versions('foo', '~> 1.2.3') dep.versions.should == ['~> 1.2.3'] end it "should parse multiple versions" do dep = subject.parse_versions('foo', '~> 1.2.3, >= 1.4.0') dep.versions.should == ['~> 1.2.3', '>= 1.4.0'] end it "should parse an Array of versions" do dep = subject.parse_versions('foo', ['~> 1.2.3', '>= 1.4.0']) dep.versions.should == ['~> 1.2.3', '>= 1.4.0'] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ore-core-0.1.4 | spec/dependency_spec.rb |
ore-core-0.1.3 | spec/dependency_spec.rb |