Don't be dopey in the RSpec version matching

bug/bundler_fix
Tod Beardsley 2013-11-13 13:04:26 -06:00
parent 3500cf06d4
commit 5e342debbc
No known key found for this signature in database
GPG Key ID: 1EFFB682ADB9F193
1 changed files with 15 additions and 6 deletions

View File

@ -21,12 +21,21 @@ describe Msf::Framework do
end end
it "should return the concatenation of Major.Minor.Point-Release" do it "should return the concatenation of Major.Minor.Point-Release" do
major,minor,point_release = CURRENT_VERSION.split(".") major,minor,point,release = subject.version.split(/[.-]/)
point,release = point_release.split("-") major.to_i.should == described_class::Major
major.to_i.should == described_class.const_get(:Major) minor.to_i.should == described_class::Minor
minor.to_i.should == described_class.const_get(:Minor) point.to_i.should == described_class::Point
point.to_i.should == described_class.const_get(:Point) "-#{release}".should == described_class::Release
"-#{release}".should == described_class.const_get(:Release) end
pending "conform to SemVer 2.0 syntax: http://semver.org/" do
it "should have constants that correspond to SemVer standards" do
major,minor,patch,label = subject.version.split(/[.-]/)
major.to_i.should == described_class::VERSION::MAJOR
minor.to_i.should == described_class::VERSION::MINOR
point.to_i.should == described_class::VERSION::POINT
label.to_s.should == described_class::VERSION::LABEL
end
end end
end end