Use named subject instead of subject

MSP-11147
bug/bundler_fix
Luke Imhoff 2014-11-12 12:18:08 -06:00
parent 61109d5567
commit 22cbc5ca02
No known key found for this signature in database
GPG Key ID: 5B1FB01FB33356F8
1 changed files with 5 additions and 5 deletions

View File

@ -8,20 +8,20 @@ describe Msf::Framework do
describe "#version" do describe "#version" do
CURRENT_VERSION = "4.10.1-dev" CURRENT_VERSION = "4.10.1-dev"
subject do subject(:framework) do
described_class.new described_class.new
end end
it "should return the current version" do it "should return the current version" do
subject.version.should == CURRENT_VERSION framework.version.should == CURRENT_VERSION
end end
it "should return the Version constant" do it "should return the Version constant" do
described_class.const_get(:Version).should == subject.version described_class.const_get(:Version).should == framework.version
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 = subject.version.split(/[.-]/) major,minor,point,release = framework.version.split(/[.-]/)
major.to_i.should == described_class::Major major.to_i.should == described_class::Major
minor.to_i.should == described_class::Minor minor.to_i.should == described_class::Minor
point.to_i.should == described_class::Point point.to_i.should == described_class::Point
@ -30,7 +30,7 @@ describe Msf::Framework do
skip "conform to SemVer 2.0 syntax: http://semver.org/" do skip "conform to SemVer 2.0 syntax: http://semver.org/" do
it "should have constants that correspond to SemVer standards" do it "should have constants that correspond to SemVer standards" do
major,minor,patch,label = subject.version.split(/[.-]/) major,minor,patch,label = framework.version.split(/[.-]/)
major.to_i.should == described_class::VERSION::MAJOR major.to_i.should == described_class::VERSION::MAJOR
minor.to_i.should == described_class::VERSION::MINOR minor.to_i.should == described_class::VERSION::MINOR
point.to_i.should == described_class::VERSION::POINT point.to_i.should == described_class::VERSION::POINT