Fix RMI Registry specs
parent
12d2594095
commit
62272e64ed
|
@ -163,6 +163,10 @@ describe Msf::Java::Rmi::Client::Registry do
|
|||
allow_any_instance_of(::StringIO).to receive(:get_once) do |io, length, timeout|
|
||||
io.read
|
||||
end
|
||||
|
||||
allow_any_instance_of(::StringIO).to receive(:has_read_data?) do |io|
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
it "returns empty array" do
|
||||
|
@ -181,6 +185,10 @@ describe Msf::Java::Rmi::Client::Registry do
|
|||
allow_any_instance_of(::StringIO).to receive(:get_once) do |io, length, timeout|
|
||||
io.read
|
||||
end
|
||||
|
||||
allow_any_instance_of(::StringIO).to receive(:has_read_data?) do |io|
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
it "returns the list of registered names" do
|
||||
|
@ -202,6 +210,10 @@ describe Msf::Java::Rmi::Client::Registry do
|
|||
allow_any_instance_of(::StringIO).to receive(:get_once) do |io, length, timeout|
|
||||
io.read
|
||||
end
|
||||
|
||||
allow_any_instance_of(::StringIO).to receive(:has_read_data?) do |io|
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
it "raises an Rex::Proto::Rmi::Exception" do
|
||||
|
@ -220,6 +232,10 @@ describe Msf::Java::Rmi::Client::Registry do
|
|||
allow_any_instance_of(::StringIO).to receive(:get_once) do |io, length, timeout|
|
||||
io.read
|
||||
end
|
||||
|
||||
allow_any_instance_of(::StringIO).to receive(:has_read_data?) do |io|
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
it "returns the reference information" do
|
||||
|
|
Loading…
Reference in New Issue