Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 25 lines (21 sloc) 0.862 kB
b4bd528 @jamis fix tests to depend on a preset load path rather than an explicit req…
jamis authored
1 require "utils"
f74ab73 @jamis Logger and version tests. Lay the actor class to rest.
jamis authored
2 require 'capistrano/version'
3
4 class VersionTest < Test::Unit::TestCase
5 def test_check_should_return_true_for_matching_parameters
6 assert Capistrano::Version.check([2], [2])
7 assert Capistrano::Version.check([2,1], [2,1])
8 assert Capistrano::Version.check([2,1,5], [2,1,5])
9 end
10
11 def test_check_should_return_true_if_first_is_less_than_second
12 assert Capistrano::Version.check([2], [3])
13 assert Capistrano::Version.check([2], [2,1])
14 assert Capistrano::Version.check([2,1], [2,2])
15 assert Capistrano::Version.check([2,1], [2,1,1])
16 end
17
18 def test_check_should_return_false_if_first_is_greater_than_second
19 assert !Capistrano::Version.check([3], [2])
20 assert !Capistrano::Version.check([3,1], [3])
21 assert !Capistrano::Version.check([3,2], [3,1])
22 assert !Capistrano::Version.check([3,2,1], [3,2])
23 end
24 end
Something went wrong with that request. Please try again.