Sha256: f027cc9b16986667763572dbd8cbeb7dd8864ce2e71513b3291c2012806bb37b

Contents?: true

Size: 211 Bytes

Versions: 5

Compression:

Stored size: 211 Bytes

Contents

RSpec::Matchers.define :override_method do |expected|
  match do |actual|
    klass = actual.is_a?(Class) ? actual : actual.class
    method = klass.instance_method(expected)
    method.owner == klass
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
message-driver-1.0.1 spec/support/matchers/override_method_matcher.rb
message-driver-1.0.0 spec/support/matchers/override_method_matcher.rb
message-driver-0.7.2 spec/support/matchers/override_method_matcher.rb
message-driver-0.7.1 spec/support/matchers/override_method_matcher.rb
message-driver-0.7.0 spec/support/matchers/override_method_matcher.rb