C0 code coverage information
Generated on Mon Aug 13 01:18:54 -0400 2007 with rcov 0.8.0
Code reported as executed by Ruby looks like this...
and this: this line is also marked as covered.
Lines considered as run by rcov, but not reported by Ruby, look like this,
and this: these lines were inferred by rcov (using simple heuristics).
Finally, here's a line marked as not executed.
1 module Spec
2 module Mocks
3 class Mock
4 include Methods
5
6 # Creates a new mock with a +name+ (that will be used in error messages only)
7 # == Options:
8 # * <tt>:null_object</tt> - if true, the mock object acts as a forgiving null object allowing any message to be sent to it.
9 def initialize(name, options={})
10 @name = name
11 @options = options
12 end
13
14 def method_missing(sym, *args, &block)
15 __mock_proxy.instance_eval {@messages_received << [sym, args, block]}
16 begin
17 return self if __mock_proxy.null_object?
18 super(sym, *args, &block)
19 rescue NoMethodError
20 __mock_proxy.raise_unexpected_message_error sym, *args
21 end
22 end
23
24 def inspect
25 "#<#{self.class}:#{sprintf '0x%x', self.object_id} @name=#{@name.inspect}>"
26 end
27 end
28 end
29 end
Generated using the rcov code coverage analysis tool for Ruby version 0.8.0.