Class: Spec::Expectations::Should::ItemHandler
- Inherits:
-
Object
- Object
- Spec::Expectations::Should::ItemHandler
show all
- Defined in:
- lib/spec/expectations/should/have.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of ItemHandler.
102
103
104
|
# File 'lib/spec/expectations/should/have.rb', line 102
def initialize(target)
@target = target
end
|
Instance Method Details
#fail_with(message) ⇒ Object
106
107
108
|
# File 'lib/spec/expectations/should/have.rb', line 106
def fail_with(message)
Spec::Expectations.fail_with(message)
end
|
#wants_to_handle(sym) ⇒ Object
98
99
100
|
# File 'lib/spec/expectations/should/have.rb', line 98
def wants_to_handle(sym)
@target.respond_to?("has_#{sym}?")
end
|