diff options
Diffstat (limited to 'spec/ruby/library/prime/integer/prime_spec.rb')
| -rw-r--r-- | spec/ruby/library/prime/integer/prime_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/ruby/library/prime/integer/prime_spec.rb b/spec/ruby/library/prime/integer/prime_spec.rb index ba869ba60e..d24f883b19 100644 --- a/spec/ruby/library/prime/integer/prime_spec.rb +++ b/spec/ruby/library/prime/integer/prime_spec.rb @@ -1,17 +1,17 @@ -require File.expand_path('../../../../spec_helper', __FILE__) +require_relative '../../../spec_helper' require 'prime' describe "Integer#prime?" do it "returns a true value for prime numbers" do - 2.prime?.should be_true - 3.prime?.should be_true - (2**31-1).prime?.should be_true # 8th Mersenne prime (M8) + 2.prime?.should == true + 3.prime?.should == true + (2**31-1).prime?.should == true # 8th Mersenne prime (M8) end it "returns a false value for composite numbers" do - 4.prime?.should be_false - 15.prime?.should be_false - (2**32-1).prime?.should be_false - ( (2**17-1)*(2**19-1) ).prime?.should be_false # M6*M7 + 4.prime?.should == false + 15.prime?.should == false + (2**32-1).prime?.should == false + ( (2**17-1)*(2**19-1) ).prime?.should == false # M6*M7 end end |
