Sha256: c0a28f748f3431b7c5f15b48bcf937da27e14c0374f6d2f45fa8ab59d9008852

Contents?: true

Size: 883 Bytes

Versions: 29

Compression:

Stored size: 883 Bytes

Contents

require 'test_helper'

class ComparableTest < Test::Unit::TestCase
  context 'A comparable version' do
    setup do
      @version_1 = Version.new(:number => 1)
      @version_2 = Version.new(:number => 2)
    end

    should 'equal itself' do
      assert @version_1 == @version_1
      assert @version_2 == @version_2
    end

    context 'with version number 1' do
      should 'not equal a version with version number 2' do
        assert @version_1 != @version_2
      end

      should 'be less than a version with version number 2' do
        assert @version_1 < @version_2
      end
    end

    context 'with version number 2' do
      should 'not equal a version with version number 1' do
        assert @version_2 != @version_1
      end

      should 'be greater than a version with version number 1' do
        assert @version_2 > @version_1
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 7 rubygems

Version Path
andoq-vestal_versions-0.6.1 test/comparable_test.rb
laserlemon-vestal_versions-0.4.2 test/comparable_test.rb
laserlemon-vestal_versions-0.4.3 test/comparable_test.rb
laserlemon-vestal_versions-0.4.4 test/comparable_test.rb
laserlemon-vestal_versions-0.4.5 test/comparable_test.rb
laserlemon-vestal_versions-0.5.0 test/comparable_test.rb
laserlemon-vestal_versions-0.6.0 test/comparable_test.rb
laserlemon-vestal_versions-0.7.0 test/comparable_test.rb
laserlemon-vestal_versions-0.7.1 test/comparable_test.rb
laserlemon-vestal_versions-0.8.0 test/comparable_test.rb
sthapit-vestal_versions-0.7.0 test/comparable_test.rb
sthapit-vestal_versions-0.7.1 test/comparable_test.rb
sthapit-vestal_versions-0.8.0 test/comparable_test.rb
versioned-0.2.1 test/comparable_test.rb
versioned-0.2.0 test/comparable_test.rb
jacqui-versioned-0.1.1 test/comparable_test.rb
mrkurt-versioned-0.1.1 test/comparable_test.rb
mrkurt-versioned-0.1.0 test/comparable_test.rb
versioned-0.1.0 test/comparable_test.rb
vestal_versions-0.8.3 test/comparable_test.rb