You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rs...@googlegroups.com
Hello,
I'm toying around with a matcher to compare the interface of two
classes.
I intend to use this where ever I am providing an explicit fake or
stub of a class.
class MatchInterface
def initialize(klass)
@klass = klass
end
def failure_message
diff = (@lhs - @rhs) + (@rhs - @lhs)
"The following methods are different:\n#{diff.join("\n")}"
end
end
I'd like to include
* Class methods
* Arity verification (would love to use RSpec::Support::MethodSignature
for this ... might consider making it public)
* Partial interface (i.e. it doesn't implement all methods, but
the ones it does are correct and valid)