Method: Hardmock.has_replaced_method?
- Defined in:
- lib/hardmock/stubbing.rb
.has_replaced_method?(obj, method_name) ⇒ Boolean
186 187 188 189 190 191 |
# File 'lib/hardmock/stubbing.rb', line 186 def has_replaced_method?(obj, method_name) hits = all_replaced_methods.select do |replaced| (replaced.target.object_id == obj.object_id) and (replaced.method_name.to_s == method_name.to_s) end return !hits.empty? end |