Class: BetterReceive::Mock
- Inherits:
-
Base
- Object
- Base
- BetterReceive::Mock
show all
- Defined in:
- lib/better_receive/mock.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#assert_negative_with(selector, options = {}, &block) ⇒ Object
14
15
16
17
18
19
20
21
22
|
# File 'lib/better_receive/mock.rb', line 14
def assert_negative_with(selector, options={}, &block)
selector = selector.to_sym
if subject_is_any_instance?
any_instance_better_not_expect(selector, options, &block)
else
subject.should respond_to selector
negative_mock_subject_method(selector, options, &block)
end
end
|
#assert_with(selector, options = {}, &block) ⇒ Object
4
5
6
7
8
9
10
11
12
|
# File 'lib/better_receive/mock.rb', line 4
def assert_with(selector, options={}, &block)
selector = selector.to_sym
if subject_is_any_instance?
any_instance_better_expect(selector, options, &block)
else
subject.should respond_to selector
mock_subject_method(selector, options, &block)
end
end
|