diff options
Diffstat (limited to 'spec/ruby/library/socket/option/initialize_spec.rb')
| -rw-r--r-- | spec/ruby/library/socket/option/initialize_spec.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/ruby/library/socket/option/initialize_spec.rb b/spec/ruby/library/socket/option/initialize_spec.rb index 8071ad7ef0..5af274f332 100644 --- a/spec/ruby/library/socket/option/initialize_spec.rb +++ b/spec/ruby/library/socket/option/initialize_spec.rb @@ -10,7 +10,7 @@ describe 'Socket::Option#initialize' do opt = Socket::Option .new(Socket::AF_INET, Socket::SOL_SOCKET, Socket::SO_KEEPALIVE, @bool) - opt.should be_an_instance_of(Socket::Option) + opt.should.instance_of?(Socket::Option) opt.family.should == Socket::AF_INET opt.level.should == Socket::SOL_SOCKET @@ -23,7 +23,7 @@ describe 'Socket::Option#initialize' do it 'returns a Socket::Option' do opt = Socket::Option.new(:INET, :SOCKET, :KEEPALIVE, @bool) - opt.should be_an_instance_of(Socket::Option) + opt.should.instance_of?(Socket::Option) opt.family.should == Socket::AF_INET opt.level.should == Socket::SOL_SOCKET @@ -34,19 +34,19 @@ describe 'Socket::Option#initialize' do it 'raises when using an invalid address family' do -> { Socket::Option.new(:INET2, :SOCKET, :KEEPALIVE, @bool) - }.should raise_error(SocketError) + }.should.raise(SocketError) end it 'raises when using an invalid level' do -> { Socket::Option.new(:INET, :CATS, :KEEPALIVE, @bool) - }.should raise_error(SocketError) + }.should.raise(SocketError) end it 'raises when using an invalid option name' do -> { Socket::Option.new(:INET, :SOCKET, :CATS, @bool) - }.should raise_error(SocketError) + }.should.raise(SocketError) end end @@ -54,7 +54,7 @@ describe 'Socket::Option#initialize' do it 'returns a Socket::Option' do opt = Socket::Option.new('INET', 'SOCKET', 'KEEPALIVE', @bool) - opt.should be_an_instance_of(Socket::Option) + opt.should.instance_of?(Socket::Option) opt.family.should == Socket::AF_INET opt.level.should == Socket::SOL_SOCKET @@ -65,19 +65,19 @@ describe 'Socket::Option#initialize' do it 'raises when using an invalid address family' do -> { Socket::Option.new('INET2', 'SOCKET', 'KEEPALIVE', @bool) - }.should raise_error(SocketError) + }.should.raise(SocketError) end it 'raises when using an invalid level' do -> { Socket::Option.new('INET', 'CATS', 'KEEPALIVE', @bool) - }.should raise_error(SocketError) + }.should.raise(SocketError) end it 'raises when using an invalid option name' do -> { Socket::Option.new('INET', 'SOCKET', 'CATS', @bool) - }.should raise_error(SocketError) + }.should.raise(SocketError) end end end |
