Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 125 lines (93 sloc) 2.871 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
require "naturalsorter"

describe ReleaseRecognizer do
  
  it "release? is true" do
    ReleaseRecognizer.release?("1.1").should be_true
  end

  it "release? is true" do
    ReleaseRecognizer.release?("1.0.0").should be_true
  end

  it "release? is true" do
    ReleaseRecognizer.release?("1").should be_true
  end

  it "release? is true" do
    ReleaseRecognizer.release?("3.3.2.GA").should be_true
  end

  it "release? is true" do
    ReleaseRecognizer.release?("4.1.5.SP1").should be_true
  end

  it "release? is true" do
    ReleaseRecognizer.release?("3.1.0.RELEASE").should be_true
  end

  it "release? is true" do
    ReleaseRecognizer.release?("3.2.0.BUILD").should be_true
  end

  it "release? is true" do
    ReleaseRecognizer.release?("3.2.0buiLd").should be_true
  end

  it "release? is true" do
    ReleaseRecognizer.release?("3.2.0.Final").should be_true
  end

  it "release? is true" do
    ReleaseRecognizer.release?("3.2.0FINAL").should be_true
  end

  it "release? is false" do
    ReleaseRecognizer.release?("1.1.pre").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("2.5.6.SEC03").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("2.3.8.pre1").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("2.3.9.pre").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("3.0.0.beta4").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("3.0.0.BETA4").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("3.0.0.beta").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("3.0.0.rc").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("3.0.0.rc2").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("3.0.0.RC2").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("2.0.x-dev").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("2.0.x-DEV").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("1.8b1").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("1.8B1").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("1.1.3a").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("1.1.3A").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("1.SNAPSHOT").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("1.snapshot").should be_false
  end

  it "release? is false" do
    ReleaseRecognizer.release?("1.M1").should be_false
  end
  
  it "release? is false" do
    ReleaseRecognizer.release?("2.0-m4").should be_false
  end

end
Something went wrong with that request. Please try again.