Skip to content

Commit

Permalink
Read 38 bytes from the SSL socket.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatsuya Suzuki authored and cqr committed Dec 13, 2010
1 parent f57a864 commit c69bf3b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions spec/apn_on_rails/libs/feedback_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@
@device = DeviceFactory.create
@cert = mock('cert_mock')

@data_mock = mock('data_mock')
@data_mock.should_receive(:strip!)
@data_mock = mock('data_mock')
@data_mock.should_receive(:unpack).with('N1n1H140').and_return([@time.to_i, 12388, @device.token.delete(' ')])

@ssl_mock = mock('ssl_mock')
@ssl_mock = mock('ssl_mock')
@ssl_mock.should_receive(:read).with(38).twice.and_return(@data_mock, nil)
@sock_mock = mock('sock_mock')
@sock_mock.should_receive(:gets).twice.and_return(@data_mock, nil)

end

it 'should an Array of devices that need to be processed' do
Expand Down

0 comments on commit c69bf3b

Please sign in to comment.