Sha256: 620efcd1660dcfaf8f017f753e4c0df8d7ad24eb3d6b1cbb3513a01a338de457

Contents?: true

Size: 1.39 KB

Versions: 9

Compression:

Stored size: 1.39 KB

Contents

require "spec_helper"

describe Redcar::Application::Updates do

  describe "comparing versions logic" do

    it "0.10 = 0.10" do
      Redcar::Application::Updates.newer_than?([0, 10], [0, 10]).should be_false
    end
    
    it "0.10.0 = 0.10" do
      Redcar::Application::Updates.newer_than?([0, 10, 0], [0, 10]).should be_false
    end

    it "0.10 = 0.10.0" do
      Redcar::Application::Updates.newer_than?([0, 10], [0, 10, 0]).should be_false
    end
    
    it "0.10.1 > 0.10" do
      Redcar::Application::Updates.newer_than?([0, 10, 1], [0, 10]).should be_true
    end
    
    it "0.11 > 0.10" do
      Redcar::Application::Updates.newer_than?([0, 11], [0, 10]).should be_true
    end

    it "0.11.1 > 0.10" do
      Redcar::Application::Updates.newer_than?([0, 11, 1], [0, 10]).should be_true
    end

    it "0.11 > 0.10.1" do
      Redcar::Application::Updates.newer_than?([0, 11], [0, 10, 1]).should be_true
    end
    
    it "0.11.1 > 0.10.1" do
      Redcar::Application::Updates.newer_than?([0, 11, 1], [0, 10, 1]).should be_true
    end

    it "0.9 < 0.10" do
      Redcar::Application::Updates.newer_than?([0, 9], [0, 10]).should be_false
    end

    it "0.9.1 < 0.10" do
      Redcar::Application::Updates.newer_than?([0, 9, 1], [0, 10]).should be_false
    end

    it "0.9 < 0.10.1" do
      Redcar::Application::Updates.newer_than?([0, 9], [0, 10, 1]).should be_false
    end

  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
redcar-0.13 plugins/application/spec/application/updates_spec.rb
redcar-dev-0.13.5dev plugins/application/spec/application/updates_spec.rb
redcar-dev-0.13.4dev plugins/application/spec/application/updates_spec.rb
redcar-dev-0.13.3dev plugins/application/spec/application/updates_spec.rb
redcar-dev-0.13.2dev plugins/application/spec/application/updates_spec.rb
redcar-dev-0.13.1dev plugins/application/spec/application/updates_spec.rb
redcar-0.12.1 plugins/application/spec/application/updates_spec.rb
redcar-dev-0.13.0dev plugins/application/spec/application/updates_spec.rb
redcar-0.12 plugins/application/spec/application/updates_spec.rb