Sha256: 75816dee4c97d7ba6a59fe9ff66e28061f686ab46ba5c6eb545eba2e36aefa45

Contents?: true

Size: 214 Bytes

Versions: 20

Compression:

Stored size: 214 Bytes

Contents

describe Integer, "#nth_prime" do
  Prime.first(20).each_with_index do |prime, n|
    n = n.succ
    it "should return #{prime} as the #{n}#{n.ordinal} prime" do
      n.nth_prime.should == prime
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
numb-0.186.0 spec/numb/nth_prime_spec.rb
numb-0.185.0 spec/numb/nth_prime_spec.rb
numb-0.184.0 spec/numb/nth_prime_spec.rb
numb-0.181.0 spec/numb/nth_prime_spec.rb
numb-0.170.0 spec/numb/nth_prime_spec.rb
numb-0.152.0 spec/numb/nth_prime_spec.rb
numb-0.138.0 spec/numb/nth_prime_spec.rb
numb-0.125.0 spec/numb/nth_prime_spec.rb
numb-0.114.0 spec/numb/nth_prime_spec.rb
numb-0.111.0 spec/numb/nth_prime_spec.rb
numb-0.109.0 spec/numb/nth_prime_spec.rb
numb-0.99.0 spec/numb/nth_prime_spec.rb
numb-0.96.0 spec/numb/nth_prime_spec.rb
numb-0.89.0 spec/numb/nth_prime_spec.rb
numb-0.84.0 spec/nth_prime_spec.rb
numb-0.77.0 spec/nth_prime_spec.rb
numb-0.72.1 spec/nth_prime_spec.rb
numb-0.72.0 spec/nth_prime_spec.rb
numb-0.68.0 spec/nth_prime_spec.rb
numb-0.63.0 spec/nth_prime_spec.rb