C0 code coverage information
Generated on Mon Feb 18 04:30:36 -0500 2008 with rcov 0.8.1.2
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 FixtureReplacementController
2 class MethodGenerator
3
4 class << self
5 def generate_methods
6 AttributeCollection.instances.each do |attributes_instance|
7 new(attributes_instance).generate_methods
8 end
9 end
10 end
11
12 def initialize(object_attributes)
13 @object_attributes = object_attributes
14 end
15
16 def generate_methods
17 generate_default_method
18 generate_new_method
19 generate_create_method
20 end
21
22 def generate_default_method
23 obj = @object_attributes
24
25 ClassFactory.fixture_replacement_module.module_eval do
26 define_method("default_#{obj.fixture_name}") do |*args|
27 hash = args[0] || Hash.new
28 DelayedEvaluationProc.new {
29 [obj, hash]
30 }
31 end
32 end
33 end
34
35 def generate_create_method
36 obj = @object_attributes
37
38 ClassFactory.fixture_replacement_module.module_eval do
39 define_method("create_#{obj.fixture_name}") do |*args|
40 obj.to_created_class_instance(args[0], self)
41 end
42 end
43 end
44
45 def generate_new_method
46 obj = @object_attributes
47
48 ClassFactory.fixture_replacement_module.module_eval do
49 define_method("new_#{obj.fixture_name}") do |*args|
50 obj.to_new_class_instance(args[0], self)
51 end
52 end
53 end
54 end
55 end
Generated using the rcov code coverage analysis tool for Ruby
version 0.8.1.2.