Class: Spec::Example::ExampleGroup
- Inherits:
-
Object
- Object
- Spec::Example::ExampleGroup
- Defined in:
- rtm/spec/helpers/spec_exampleexamplegroup.rb
Instance Method Summary
Instance Method Details
- (Object) be_a_kind_of(expected)
3 4 5 6 7 8 9 10 11 12 |
# File 'rtm/spec/helpers/spec_exampleexamplegroup.rb', line 3 def be_a_kind_of(expected) Matcher.new :be_a_kind_of, expected do |_expected_| match do |actual| # actual.kind_of?(_expected_) ot = _expected_.methods(true).map {|m| _expected_.method(m) } at = actual.class.methods(true).map {|m| actual.class.method(m) } at.select {|m| !ot.include? m }.empty? end end end |