diff options
Diffstat (limited to 'spec/ruby/core/random/shared/rand.rb')
-rw-r--r-- | spec/ruby/core/random/shared/rand.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/ruby/core/random/shared/rand.rb b/spec/ruby/core/random/shared/rand.rb new file mode 100644 index 0000000000..d3b24b8851 --- /dev/null +++ b/spec/ruby/core/random/shared/rand.rb @@ -0,0 +1,9 @@ +describe :random_number, shared: true do + it "returns a Float if no max argument is passed" do + @object.send(@method).should be_kind_of(Float) + end + + it "returns an Integer if an Integer argument is passed" do + @object.send(@method, 20).should be_kind_of(Integer) + end +end |