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 module SpecMethods
4 include Spec::Mocks::ArgumentConstraintMatchers
5
6 # Shortcut for creating an instance of Spec::Mocks::Mock.
7 def mock(name, options={})
8 Spec::Mocks::Mock.new(name, options)
9 end
10
11 # Shortcut for creating an instance of Spec::Mocks::Mock with
12 # predefined method stubs.
13 #
14 # == Examples
15 #
16 # stub_thing = stub("thing", :a => "A")
17 # stub_thing.a == "A" => true
18 #
19 # stub_person = stub("thing", :name => "Joe", :email => "joe@domain.com")
20 # stub_person.name => "Joe"
21 # stub_person.email => "joe@domain.com"
22 def stub(name, stubs={})
23 object_stub = mock(name)
24 stubs.each { |key, value| object_stub.stub!(key).and_return(value) }
25 object_stub
26 end
27
28 end
29 end
30 end
Generated using the rcov code coverage analysis tool for Ruby version 0.8.0.