Class Net::SSH::Test::LocalPacket
In: lib/net/ssh/test/local_packet.rb
Parent: Packet

This is a specialization of Net::SSH::Test::Packet for representing mock packets that are sent from the local (client) host. These are created automatically by Net::SSH::Test::Script and Net::SSH::Test::Channel by any of the sends_* methods.

Methods

local?   new   process  

Attributes

init  [R] 

Public Class methods

Extend the default Net::SSH::Test::Packet constructor to also accept an optional block, which is used to finalize the initialization of the packet when process is first called.

Public Instance methods

Returns true; this is a local packet.

Called by Net::SSH::Test::Extensions::PacketStream#test_enqueue_packet to mimic remote processing of a locally-sent packet. It compares the packet it was given with the contents of this LocalPacket‘s data, to see if what was sent matches what was scripted. If it differs in any way, an exception is raised.

[Validate]