use to_h instead of to_hash
apparently ruby 2 adds this as a standard method so we should stay compliantbug/bundler_fix
parent
0e65792f43
commit
dbde046f44
|
@ -90,7 +90,11 @@ module Metasploit
|
|||
self
|
||||
end
|
||||
|
||||
def to_hash
|
||||
# This method takes all of the attributes of the {Credential} and spits
|
||||
# them out in a hash compatible with the create_credential calls.
|
||||
#
|
||||
# @return [Hash] a hash compatible with #create_credential
|
||||
def to_h
|
||||
{
|
||||
private_data: private,
|
||||
private_type: private_type,
|
||||
|
|
|
@ -143,7 +143,7 @@ describe Metasploit::Framework::Credential do
|
|||
end
|
||||
end
|
||||
|
||||
describe '#to_hash' do
|
||||
describe '#to_h' do
|
||||
subject(:cred_detail) do
|
||||
described_class.new(public: public, private: private, realm: realm, realm_key: realm_type, private_type: private_type)
|
||||
end
|
||||
|
@ -155,7 +155,7 @@ describe Metasploit::Framework::Credential do
|
|||
realm_key: realm_type,
|
||||
realm_value: realm
|
||||
}
|
||||
expect(cred_detail.to_hash).to eq cred_hash
|
||||
expect(cred_detail.to_h).to eq cred_hash
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue