1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Consistant Capistrano::VERSION interface

The latest version of Capistrano uses Capistrano::VERSION for storing the gem
version. This change adds a constant to match this interface for v2.
This commit is contained in:
Sasha Gerrand 2014-07-22 12:18:39 +01:00 committed by Lee Hambley
parent bbc7abb038
commit c971854ea7
2 changed files with 13 additions and 0 deletions

View file

@ -8,4 +8,6 @@ module Capistrano
"#{MAJOR}.#{MINOR}.#{PATCH}"
end
end
VERSION = Version.to_s
end

11
test/version_test.rb Normal file
View file

@ -0,0 +1,11 @@
require 'capistrano/version'
class VersionTest < Test::Unit::TestCase
def test_version_constant_is_not_nil
assert_not_nil Capistrano::VERSION
end
def test_version_constant_matches_class_method
assert_equal Capistrano::VERSION, Capistrano::Version.to_s
end
end