C0 code coverage information

Generated on Sun Oct 26 11:18:15 -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.
Name Total lines Lines of code Total coverage Code coverage
spec/aquarium/utils/hash_utils_spec.rb 48 35
100.0% 
100.0% 
 1 require File.dirname(__FILE__) + '/../spec_helper'
 2 require 'aquarium/spec_example_types'
 3 require 'aquarium/utils/hash_utils'
 4 
 5 describe Aquarium::Utils::HashUtils, "#make_hash" do
 6   
 7   it "should return an empty hash if the input is nil." do
 8     make_hash(nil).should == {}
 9   end
10 
11   it "should return an empty hash if the input hash is empty." do
12     make_hash({}).should == {}
13   end
14 
15   it "should return a hash with all nil keys and their corresponding values removed." do
16     make_hash({nil => 'nil', :a => 'a'}).should == {:a => 'a'}
17   end
18 
19   it "should return an unmodified hash if the input hash has no nil keys." do
20     make_hash({:a => 'a', :b => 'b'}).should == {:a => 'a', :b => 'b'}
21   end
22 
23   it "should return a 1-element hash with an empty key and a nil value if the input is empty." do
24     make_hash("").should == {"" => nil}
25   end
26 
27   it "should return a 1-element hash with the input item as a key and nil as the corresponding value if a single input value is given and no block is given." do
28     make_hash("123").should == {"123" => nil}
29   end
30 
31   it "should return a 1-element hash with the input item as a key and the value of the block as the corresponding value if a single input value is given." do
32     make_hash("123"){|x| x+x}.should == {"123" => "123123"}
33   end
34 
35   it "should return a hash with the input list items as keys with any nils removed." do
36     make_hash(["123", nil, nil, "22", nil]).should == {"123" => nil, "22" => nil}
37   end
38 
39   it "should return a hash with the input list items as keys and nils as the corresponding values, if no block is given." do
40     make_hash(["123", "22"]).should == {"123" => nil, "22" => nil}
41   end
42 
43   it "should return a hash with the input list items as keys and the value of the block as the corresponding value." do
44     make_hash(["123", "22"]){|x| x+x}.should == {"123" => "123123", "22" => "2222"}
45   end
46 
47 end
48 

Generated using the rcov code coverage analysis tool for Ruby version 0.8.1.2.

Valid XHTML 1.0! Valid CSS!