blob: 19a50ac4e150c05cf26c86b1b1e7f37506417298 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
require 'mspec/mocks/proxy'
class Object
def should_receive(sym)
Mock.install_method self, sym
end
def should_not_receive(sym)
proxy = Mock.install_method self, sym
proxy.exactly(0).times
end
def stub!(sym)
Mock.install_method self, sym, :stub
end
end
def mock(name, options={})
MockObject.new name, options
end
def mock_int(val)
MockIntObject.new(val)
end
def mock_numeric(name, options={})
NumericMockObject.new name, options
end
|