PageRenderTime 25ms CodeModel.GetById 11ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 0ms

/vendor/bundle/jruby/2.1/gems/redis-3.0.7/test/helper_test.rb

https://github.com/delowong/logstash
Ruby | 24 lines | 16 code | 7 blank | 1 comment | 1 complexity | 1e15e3f3afa41b7776df4ffa8c1c1f64 MD5 | raw file
 1# encoding: UTF-8
 2
 3require File.expand_path("helper", File.dirname(__FILE__))
 4
 5class TestHelper < Test::Unit::TestCase
 6
 7  include Helper
 8
 9  def test_version_comparison
10    v = Version.new("2.0.1")
11
12    assert v > "1"
13    assert v > "2"
14    assert v < "3"
15    assert v < "10"
16
17    assert v < "2.1"
18    assert v < "2.0.2"
19    assert v < "2.0.1.1"
20    assert v < "2.0.10"
21
22    assert v == "2.0.1"
23  end
24end