Fix RMI Registry specs

bug/bundler_fix
jvazquez-r7 2015-10-09 12:16:59 -05:00
parent 12d2594095
commit 62272e64ed
No known key found for this signature in database
GPG Key ID: 38D99152B9352D83
1 changed files with 16 additions and 0 deletions

View File

@ -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