Land #3566, ducktype better
commit
5286b7cc22
|
@ -78,7 +78,9 @@ module Metasploit
|
|||
end
|
||||
|
||||
def ==(other)
|
||||
other.public == self.public && other.private == self.private && other.realm == self.realm
|
||||
other.respond_to?(:public) && other.public == self.public &&
|
||||
other.respond_to?(:private) && other.private == self.private &&
|
||||
other.respond_to?(:realm) && other.realm == self.realm
|
||||
end
|
||||
|
||||
def to_credential
|
||||
|
|
|
@ -132,6 +132,11 @@ describe Metasploit::Framework::Credential do
|
|||
expect(other).not_to eq(cred_detail)
|
||||
end
|
||||
end
|
||||
|
||||
context "when comparing to a different object" do
|
||||
let(:other) {'a string'}
|
||||
specify do
|
||||
expect(other).not_to eq(cred_detail)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue