Sha256: fc6a5c5edebd4f1a1c89ae4c89f84d2f0487e72571457e918cf81bd8bee7f8dd

Contents?: true

Size: 888 Bytes

Versions: 3

Compression:

Stored size: 888 Bytes

Contents

require "#{File.dirname(__FILE__)}/utils"
require 'capistrano/version'

class VersionTest < Test::Unit::TestCase
  def test_check_should_return_true_for_matching_parameters
    assert Capistrano::Version.check([2], [2])
    assert Capistrano::Version.check([2,1], [2,1])
    assert Capistrano::Version.check([2,1,5], [2,1,5])
  end

  def test_check_should_return_true_if_first_is_less_than_second
    assert Capistrano::Version.check([2], [3])
    assert Capistrano::Version.check([2], [2,1])
    assert Capistrano::Version.check([2,1], [2,2])
    assert Capistrano::Version.check([2,1], [2,1,1])
  end

  def test_check_should_return_false_if_first_is_greater_than_second
    assert !Capistrano::Version.check([3], [2])
    assert !Capistrano::Version.check([3,1], [3])
    assert !Capistrano::Version.check([3,2], [3,1])
    assert !Capistrano::Version.check([3,2,1], [3,2])
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
capistrano-2.0.0 test/version_test.rb
capistrano-2.1.0 test/version_test.rb
capistrano-2.2.0 test/version_test.rb