Sha256: 31b7e34b613f4f292cbaf0df39e06239e262127593d4b38ea87ac9ecc95dff33

Contents?: true

Size: 1001 Bytes

Versions: 8

Compression:

Stored size: 1001 Bytes

Contents

# encoding: utf-8
require "spec_helper"
require "desi/upstream"

describe Desi::Upstream::Release do
  context "sort" do
    let(:v1) { Desi::Upstream::Release.new("v1.0.0", "") }
    let(:v09) { Desi::Upstream::Release.new("v0.90.10", "") }

    it "sorts the v1.0.0 before v0.90.10" do
      expect([v09, v1].sort).to eql([v1, v09])
    end

    it "sorts 1.0.0.RC2 before 1.0.0" do
      expect([
        Desi::Upstream::Release.new("v1.0.0.Beta1", ""),
        Desi::Upstream::Release.new("v1.0.0.RC2", ""),
        Desi::Upstream::Release.new("v1.0.0", ""),
        Desi::Upstream::Release.new("v1.0.0.Beta2", ""),
        Desi::Upstream::Release.new("v1.0.0.RC1", ""),
      ].sort).to eql([
        Desi::Upstream::Release.new("v1.0.0", ""),
        Desi::Upstream::Release.new("v1.0.0.RC2", ""),
        Desi::Upstream::Release.new("v1.0.0.RC1", ""),
        Desi::Upstream::Release.new("v1.0.0.Beta2", ""),
        Desi::Upstream::Release.new("v1.0.0.Beta1", "")
        ])
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
desi-0.7.2 spec/desi/upstream_spec.rb
desi-0.7.1 spec/desi/upstream_spec.rb
desi-0.7.0 spec/desi/upstream_spec.rb
desi-0.6.9 spec/desi/upstream_spec.rb
desi-0.6.8 spec/desi/upstream_spec.rb
desi-0.6.7 spec/desi/upstream_spec.rb
desi-0.6.6 spec/desi/upstream_spec.rb
desi-0.6.5 spec/desi/upstream_spec.rb