Add StringIO stub to Msf::Java::Rmi::Client::Jmx::Connection
parent
3d1ec54f02
commit
12d2594095
|
@ -105,6 +105,10 @@ describe Msf::Java::Rmi::Client::Jmx::Connection 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 true" do
|
it "returns true" do
|
||||||
|
@ -125,6 +129,10 @@ describe Msf::Java::Rmi::Client::Jmx::Connection 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 true" do
|
it "returns true" do
|
||||||
|
@ -145,6 +153,10 @@ describe Msf::Java::Rmi::Client::Jmx::Connection 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 true" do
|
it "returns true" do
|
||||||
|
|
Loading…
Reference in New Issue