Permalink
Browse files

allow for rc in version

  • Loading branch information...
1 parent 7db6479 commit b9809f57b28c7fba225bc2b77aa4fae7da470e9e @saturnflyer saturnflyer committed Apr 27, 2010
Showing with 7 additions and 2 deletions.
  1. +2 −1 lib/radiant.rb
  2. +5 −1 spec/lib/radiant_spec.rb
View
@@ -6,10 +6,11 @@ module Version
Major = '0'
Minor = '9'
Tiny = '0'
+ Patch = 'rc2' # set to nil for normal release
class << self
def to_s
- [Major, Minor, Tiny].join('.')
+ [Major, Minor, Tiny, Patch].join('.')
end
alias :to_str :to_s
end
@@ -18,9 +18,13 @@
it "should have a constant for the tiny revision" do
lambda { Radiant::Version::Tiny }.should_not raise_error(NameError)
end
+
+ it "should have a constant for the patch revision" do
+ lambda { Radiant::Version::Patch }.should_not raise_error(NameError)
+ end
it "should join the revisions into the version number" do
Radiant::Version.to_s.should be_kind_of(String)
- Radiant::Version.to_s.should == [Radiant::Version::Major, Radiant::Version::Minor, Radiant::Version::Tiny].join(".")
+ Radiant::Version.to_s.should == [Radiant::Version::Major, Radiant::Version::Minor, Radiant::Version::Tiny, Radiant::Version::Patch].join(".")
end
end

0 comments on commit b9809f5

Please sign in to comment.