mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@8cafaa5
This commit is contained in:
parent
1b377b32c8
commit
2e32b919b4
35 changed files with 832 additions and 10 deletions
|
@ -99,6 +99,14 @@ describe 'BasicSocket#send' do
|
|||
@server.close
|
||||
end
|
||||
|
||||
describe 'with an object implementing #to_str' do
|
||||
it 'returns the amount of sent bytes' do
|
||||
data = mock('message')
|
||||
data.should_receive(:to_str).and_return('hello')
|
||||
@client.send(data, 0, @server.getsockname).should == 5
|
||||
end
|
||||
end
|
||||
|
||||
describe 'without a destination address' do
|
||||
it "raises #{SocketSpecs.dest_addr_req_error}" do
|
||||
-> { @client.send('hello', 0) }.should raise_error(SocketSpecs.dest_addr_req_error)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue