C0 code coverage information
Generated on Fri Aug 25 11:26:26 PDT 2006 with rcov 0.7.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 class ArticlePage
2 attr_accessor :page_number, :body, :custom_title
3 include ActionView::Helpers::TextHelper
4
5 def initialize(page_number, body, custom_title = nil)
6 @page_number, @body, @custom_title = page_number, body, custom_title
7 end
8
9 def initialize(hash = {})
10 @page_number, @body, @custom_title = hash[:page_number], hash[:body], hash[:custom_title]
11 end
12
13 def body
14 @body.gsub('%FULL ARTICLE%', '')
15 end
16
17 def body_with_tags
18 @body
19 end
20
21 def shortened_body
22 location = @body.index('%FULL ARTICLE%')
23 if location
24 @body[0...location]
25 else
26 nil
27 end
28 end
29
30 def <=>(other)
31 @page_number.to_i <=> other.page_number.to_i
32 end
33 end
Generated using the rcov code coverage analysis tool for Ruby version 0.7.0.