diff options
author | Benoit Daloze <eregontp@gmail.com> | 2019-10-26 20:53:01 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2019-10-26 20:53:01 +0200 |
commit | 664e96b1de816c813c29f61e16a2031a7af7ba86 (patch) | |
tree | 7f4691847cd6b3282812eea7e2be3758e08d1433 /spec/ruby/core/random | |
parent | 3eb0d50c0baae916f4486c264605b18e77bee0dc (diff) |
Update to ruby/spec@28a728b
Diffstat (limited to 'spec/ruby/core/random')
-rw-r--r-- | spec/ruby/core/random/rand_spec.rb | 7 | ||||
-rw-r--r-- | spec/ruby/core/random/random_number_spec.rb | 10 |
2 files changed, 10 insertions, 7 deletions
diff --git a/spec/ruby/core/random/rand_spec.rb b/spec/ruby/core/random/rand_spec.rb index d1a76e5dac..0e423301f8 100644 --- a/spec/ruby/core/random/rand_spec.rb +++ b/spec/ruby/core/random/rand_spec.rb @@ -4,7 +4,6 @@ require_relative 'shared/rand' describe "Random.rand" do it_behaves_like :random_number, :rand, Random.new - it_behaves_like :random_number, :random_number, Random.new it_behaves_like :random_number, :rand, Random it "returns a Float >= 0 if no max argument is passed" do @@ -218,9 +217,3 @@ describe "Random#rand with Range" do end.should raise_error(ArgumentError) end end - -ruby_version_is "2.6" do - describe "Random.random_number" do - it_behaves_like :random_number, :random_number, Random - end -end diff --git a/spec/ruby/core/random/random_number_spec.rb b/spec/ruby/core/random/random_number_spec.rb new file mode 100644 index 0000000000..60a80ae1b9 --- /dev/null +++ b/spec/ruby/core/random/random_number_spec.rb @@ -0,0 +1,10 @@ +require_relative '../../spec_helper' +require_relative 'shared/rand' + +describe "Random.random_number" do + it_behaves_like :random_number, :random_number, Random.new + + ruby_version_is "2.6" do + it_behaves_like :random_number, :random_number, Random + end +end |