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/library | |
parent | 3eb0d50c0baae916f4486c264605b18e77bee0dc (diff) | |
download | ruby-664e96b1de816c813c29f61e16a2031a7af7ba86.tar.gz |
Update to ruby/spec@28a728b
Diffstat (limited to 'spec/ruby/library')
-rw-r--r-- | spec/ruby/library/rubygems/gem/bin_path_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/securerandom/bytes_spec.rb | 8 | ||||
-rw-r--r-- | spec/ruby/library/securerandom/random_bytes_spec.rb | 1 | ||||
-rw-r--r-- | spec/ruby/library/socket/tcpserver/new_spec.rb | 2 |
4 files changed, 10 insertions, 3 deletions
diff --git a/spec/ruby/library/rubygems/gem/bin_path_spec.rb b/spec/ruby/library/rubygems/gem/bin_path_spec.rb index ab4ea9397e..67b3e042c2 100644 --- a/spec/ruby/library/rubygems/gem/bin_path_spec.rb +++ b/spec/ruby/library/rubygems/gem/bin_path_spec.rb @@ -11,7 +11,7 @@ describe "Gem.bin_path" do ENV['BUNDLE_GEMFILE'] = @bundle_gemfile end - guard_not -> { platform_is :windows } do + platform_is_not :windows do it "finds executables of default gems, which are the only files shipped for default gems" do # For instance, Gem.bin_path("bundler", "bundle") is used by rails new diff --git a/spec/ruby/library/securerandom/bytes_spec.rb b/spec/ruby/library/securerandom/bytes_spec.rb new file mode 100644 index 0000000000..a1ab836d16 --- /dev/null +++ b/spec/ruby/library/securerandom/bytes_spec.rb @@ -0,0 +1,8 @@ +require_relative '../../spec_helper' +require_relative '../../core/random/shared/bytes' + +require 'securerandom' + +describe "SecureRandom.bytes" do + it_behaves_like :random_bytes, :bytes, SecureRandom +end diff --git a/spec/ruby/library/securerandom/random_bytes_spec.rb b/spec/ruby/library/securerandom/random_bytes_spec.rb index 2794174f40..ed3a02255c 100644 --- a/spec/ruby/library/securerandom/random_bytes_spec.rb +++ b/spec/ruby/library/securerandom/random_bytes_spec.rb @@ -5,7 +5,6 @@ require 'securerandom' describe "SecureRandom.random_bytes" do it_behaves_like :random_bytes, :random_bytes, SecureRandom - it_behaves_like :random_bytes, :bytes, SecureRandom it "generates a random binary string of length 16 if no argument is provided" do bytes = SecureRandom.random_bytes diff --git a/spec/ruby/library/socket/tcpserver/new_spec.rb b/spec/ruby/library/socket/tcpserver/new_spec.rb index 94e5744995..d099f0175f 100644 --- a/spec/ruby/library/socket/tcpserver/new_spec.rb +++ b/spec/ruby/library/socket/tcpserver/new_spec.rb @@ -40,7 +40,7 @@ describe "TCPServer.new" do end it "binds to INADDR_ANY if the hostname is empty and the port is a string" do - @server = TCPServer.new('', 0) + @server = TCPServer.new('', '0') addr = @server.addr addr[0].should == 'AF_INET' addr[1].should be_kind_of(Integer) |