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:
		
							parent
							
								
									bbc7abb038
								
							
						
					
					
						commit
						c971854ea7
					
				
					 2 changed files with 13 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -8,4 +8,6 @@ module Capistrano
 | 
			
		|||
      "#{MAJOR}.#{MINOR}.#{PATCH}"
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  VERSION = Version.to_s
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										11
									
								
								test/version_test.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								test/version_test.rb
									
										
									
									
									
										Normal 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
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue