Add /home/pythogorian/.rbenv/versions/2.1.1/bin/ruby -S rspec ./spec/trange_frange_spec.rb

TrangeFrange
  should have a VERSION constant
  TrangeFrange::Member
    #one
      when 123
        should eq "3"
    #ten
      when 123
        should eq "2"
    #hundred
      when 123
        should eq "1"
  TrangeFrange::OrderCondition
    #add
      should eq Array
      should eq [true]
      should contain exactly nil, "content" and nil
    #match!
      should eq "content"
  TrangeFrange::Base
    #teen?
      when 123
        should be false
      when 113
        should be true
    #gender?
      when not gender
        should be false
      when gender
        should be true
  TrangeFrange::Suffix
    #gender?
      when gender
        should be true
      when not gender
        should be false
    #one?
      when one
        should be true
      when not one
        should be false
  TrangeFrange::One
    #gender
      when magnitude is odd
        should eq :m
      when magnitude is even
        should eq :f
    #word
      when simple
        should eq ""
        should eq "tri"
        should eq "četiri"
        should eq "pet"
        should eq "šest"
        should eq "sedam"
        should eq "osam"
        should eq "devet"
      when gender
        when magnitude is odd
          should eq "jedna"
          should eq "dve"
          should eq "jedna"
          should eq "dve"
          should eq "jedna"
          should eq "dve"
          should eq "jedna"
          should eq "dve"
          should eq "jedna"
          should eq "dve"
        when magnitude is even
          should eq "jedan"
          should eq "dva"
          should eq "jedan"
          should eq "dva"
          should eq "jedan"
          should eq "dva"
          should eq "jedan"
          should eq "dva"
          should eq "jedan"
          should eq "dva"
      when teen
        should be empty
        should be empty
        should be empty
        should be empty
        should be empty
        should be empty
        should be empty
        should be empty
        should be empty
        should be empty
  TrangeFrange::Ten
    private #teen_base_member
      should eq "03"
      should eq "13"
      should eq "23"
    #word
      when simple
        should eq ""
        should eq "dvadeset"
        should eq "trideset"
        should eq "četrdeset"
        should eq "pedeset"
        should eq "šezdeset"
        should eq "sedamdeset"
        should eq "osamdeset"
        should eq "devedeset"
      when teen
        should eq "jedanaest"
        should eq "dvanaest"
        should eq "trinaest"
        should eq "četrnaest"
        should eq "petnaest"
        should eq "šesnaest"
        should eq "sedamnaest"
        should eq "osamnaest"
        should eq "devetnaest"
  TrangeFrange::Hundred
    #word
      should eq ""
      should eq "jedna stotina"
      should eq "dve stotine"
      should eq "tri stotine"
      should eq "četiri stotine"
      should eq "pet stotina"
      should eq "šest stotina"
      should eq "sedam stotina"
      should eq "osam stotina"
      should eq "devet stotina"
  TrangeFrange::Thousand
    #word
      when gender
        when teen
          should eq "hiljada"
          should eq "hiljada"
          should eq "hiljada"
        when not teen
          should eq "hiljade"
          should eq "hiljade"
          should eq "hiljade"
      when simple non gender teen
        should eq "hiljada"
        should eq "hiljada"
        should eq "hiljada"
        should eq "hiljada"
        should eq "hiljada"
        should eq "hiljada"
        should eq "hiljada"
      when simple non gender not teen
        should eq "hiljada"
        should eq "hiljada"
        should eq "hiljada"
        should eq "hiljada"
        should eq "hiljada"
        should eq "hiljada"
        should eq "hiljada"
  TrangeFrange::Milion
    #word
      when one
        when not teen
          should eq "milion"
          should eq "milion"
      when other
        should eq "miliona"
        should eq "miliona"
        should eq "miliona"
        should eq "miliona"
        should eq "miliona"
        should eq "miliona"
        should eq "miliona"
        should eq "miliona"
        should eq "miliona"
        should eq "miliona"
  TrangeFrange::Bilion
    #word
      when one
        when not teen
          should eq "milijarda"
          should eq "milijarda"
      when gender
        when not teen
          should eq "milijarde"
          should eq "milijarde"
          should eq "milijarde"
      when other
        should eq "milijardi"
        should eq "milijardi"
        should eq "milijardi"
        should eq "milijardi"
        should eq "milijardi"
        should eq "milijardi"
        should eq "milijardi"
        should eq "milijardi"
  TrangeFrange::Shaper
    should eq "jedna stotina dvadeset tri hiljade četiri stotine pedeset šest"
    should eq "jedna stotina dvadeset tri hiljade četiri stotine pedeset šest i 75/100"
    should eq "jednastotinadvadesettrihiljadečetiristotinepedesetšest i 75/100"
    should eq "jednastotinadvadesettrihiljadecetiristotinepedesetsest i 75/100"
  TrangeFrange::Amount
    #amount
      when valid amount
        should eq 123
        should eq 123.45
      when invalid amount
        raise an exception
        raise an exception
    #spell!
      when valid amount
        should eq "jedan i 00/100"
        should eq "dvanaest i 34/100"
        should eq "jedna stotina dvadeset tri i 45/100"
        should eq "jedna hiljada dve stotine trideset četiri i 56/100"
        should eq "dvanaest hiljada tri stotine četrdeset pet i 67/100"
        should eq "jedna stotina dvadeset tri hiljade četiri stotine pedeset šest i 78/100"
        should eq "jedan milion dve stotine trideset četiri hiljade pet stotina šezdeset sedam i 89/100"
        should eq "dvanaest miliona tri stotine četrdeset pet hiljada šest stotina sedamdeset osam i 00/100"
        should eq "jedna stotina dvadeset tri miliona četiri stotine pedeset šest hiljada sedam stotina osamdeset devet i 00/100"
        should eq "jedna milijarda dve stotine trideset četiri miliona pet stotina šezdeset sedam hiljada osam stotina devedeset i 00/100"
        should eq "dvanaest milijardi tri stotine četrdeset pet miliona šest stotina sedamdeset osam hiljada devet stotina jedan i 00/100"
        should eq "jedna stotina dvadeset tri milijarde četiri stotine pedeset šest miliona sedam stotina osamdeset devet hiljada dvanaest i 00/100"
        when options are ommited
          should eq "jedna stotina dvadeset tri hiljade četiri stotine pedeset šest"
        when `show_fraction` option is true
          should eq "jedna stotina dvadeset tri hiljade četiri stotine pedeset šest i 78/100"
        when `show_fraction` option is false
          should eq "jedna stotina dvadeset tri hiljade četiri stotine pedeset šest"
        when `squeeze` option is true
          should eq "jednastotinadvadesettrihiljadečetiristotinepedesetšest"
        when `bald` option is true
          should eq "jedna stotina dvadeset tri hiljade cetiri stotine pedeset sest"
        when options are combined
          should eq "jednastotinadvadesettrihiljadecetiristotinepedesetsest i 78/100"
    PRIVATE
      #split!
        should eq ["12345", "00"]
        should eq ["12345", "67"]
        should eq ["12345", "68"]
      #whole_number
        should eq "12345"
      #fraction
        should eq "68"
      #generate_base!
        should eq "jedna stotina dvadeset tri"
      #generate_suffix!
        when magnitude is greater than zero
          should eq "hiljade"
        when magnitude is zero
          should eq ""
      #members
        should contain exactly "1", "234" and "567"
      #generate_words
        should eq "dvanaest hiljada tri stotine četrdeset pet"

Finished in 0.03135 seconds
168 examples, 0 failures to Gemfile