summaryrefslogtreecommitdiff
path: root/spec/ruby/core/random/rand_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/random/rand_spec.rb')
-rw-r--r--spec/ruby/core/random/rand_spec.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/ruby/core/random/rand_spec.rb b/spec/ruby/core/random/rand_spec.rb
index 0e423301f8..7fd60d5553 100644
--- a/spec/ruby/core/random/rand_spec.rb
+++ b/spec/ruby/core/random/rand_spec.rb
@@ -49,18 +49,18 @@ describe "Random.rand" do
end
end
-describe "Random#rand with Fixnum" do
+describe "Random#rand with Integer" do
it "returns an Integer" do
- Random.new.rand(20).should be_an_instance_of(Fixnum)
+ Random.new.rand(20).should be_an_instance_of(Integer)
end
- it "returns a Fixnum greater than or equal to 0" do
+ it "returns an Integer greater than or equal to 0" do
prng = Random.new
ints = 20.times.map { prng.rand(5) }
ints.min.should >= 0
end
- it "returns a Fixnum less than the argument" do
+ it "returns an Integer less than the argument" do
prng = Random.new
ints = 20.times.map { prng.rand(5) }
ints.max.should <= 4
@@ -92,19 +92,19 @@ describe "Random#rand with Fixnum" do
end
end
-describe "Random#rand with Bignum" do
- it "typically returns a Bignum" do
+describe "Random#rand with Integer" do
+ it "typically returns an Integer" do
rnd = Random.new(1)
- 10.times.map{ rnd.rand(bignum_value*2) }.max.should be_an_instance_of(Bignum)
+ 10.times.map{ rnd.rand(bignum_value*2) }.max.should be_an_instance_of(Integer)
end
- it "returns a Bignum greater than or equal to 0" do
+ it "returns an Integer greater than or equal to 0" do
prng = Random.new
bigs = 20.times.map { prng.rand(bignum_value) }
bigs.min.should >= 0
end
- it "returns a Bignum less than the argument" do
+ it "returns an Integer less than the argument" do
prng = Random.new
bigs = 20.times.map { prng.rand(bignum_value) }
bigs.max.should < bignum_value
@@ -159,7 +159,7 @@ end
describe "Random#rand with Range" do
it "returns an element from the Range" do
- Random.new.rand(20..43).should be_an_instance_of(Fixnum)
+ Random.new.rand(20..43).should be_an_instance_of(Integer)
end
it "supports custom object types" do