Fix RMI Registry specs
This commit is contained in:
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|
|
allow_any_instance_of(::StringIO).to receive(:get_once) do |io, length, timeout|
|
||||||
io.read
|
io.read
|
||||||
end
|
end
|
||||||
|
|
||||||
|
allow_any_instance_of(::StringIO).to receive(:has_read_data?) do |io|
|
||||||
|
false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns empty array" do
|
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|
|
allow_any_instance_of(::StringIO).to receive(:get_once) do |io, length, timeout|
|
||||||
io.read
|
io.read
|
||||||
end
|
end
|
||||||
|
|
||||||
|
allow_any_instance_of(::StringIO).to receive(:has_read_data?) do |io|
|
||||||
|
false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns the list of registered names" do
|
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|
|
allow_any_instance_of(::StringIO).to receive(:get_once) do |io, length, timeout|
|
||||||
io.read
|
io.read
|
||||||
end
|
end
|
||||||
|
|
||||||
|
allow_any_instance_of(::StringIO).to receive(:has_read_data?) do |io|
|
||||||
|
false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it "raises an Rex::Proto::Rmi::Exception" do
|
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|
|
allow_any_instance_of(::StringIO).to receive(:get_once) do |io, length, timeout|
|
||||||
io.read
|
io.read
|
||||||
end
|
end
|
||||||
|
|
||||||
|
allow_any_instance_of(::StringIO).to receive(:has_read_data?) do |io|
|
||||||
|
false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns the reference information" do
|
it "returns the reference information" do
|
||||||
|
|
Loading…
Reference in New Issue