Geminstaller C0 Coverage Information - RCov

lib/geminstaller/file_reader.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
lib/geminstaller/file_reader.rb 31 27
100.00%
100.00%

Key

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.

Coverage Details

1 module GemInstaller
2   class FileReader
3     def read(file_path)
4       file_contents = nil
5       if !File.exist?(file_path) then
6         raise GemInstaller::MissingFileError.new("#{file_path}")
7       end
8 
9       file = nil
10       begin
11         file = do_open(file_path)
12       rescue
13         raise GemInstaller::GemInstallerError.new("Error: Unable open file #{file_path}.  Please ensure that this file can be opened.\n")
14       end
15 
16       begin
17         do_read(file)
18       rescue
19         raise GemInstaller::GemInstallerError.new("Error: Unable read file #{file_path}.  Please ensure that this file can be read.\n")
20       end
21     end
22     
23     def do_open(file_path)
24       File.open(file_path)
25     end
26     
27     def do_read(file)
28       file.read
29     end
30   end
31 end

Generated on Mon May 10 23:40:28 -0700 2010 with rcov 0.9.8