Class: TurnipFormatter::Renderer::Html::Index
- Inherits:
-
Base
- Object
- Base
- TurnipFormatter::Renderer::Html::Index
show all
- Defined in:
- lib/turnip_formatter/renderer/html/index.rb
Constant Summary
Constants inherited
from Base
Base::TEMPLATE_DIRECTORY
Instance Method Summary
collapse
Methods inherited from Base
delegate, #id, #initialize, #render, resource_name, view, #view
Instance Method Details
#result_status ⇒ Object
62
63
64
65
66
|
# File 'lib/turnip_formatter/renderer/html/index.rb', line 62
def result_status
str = "#{scenarios.size} Scenario "
str += "(#{@resource[:failed_count]} failed #{@resource[:pending_count]} pending)"
str
end
|
#scenarios_html ⇒ Object
40
41
42
43
44
45
46
47
48
|
# File 'lib/turnip_formatter/renderer/html/index.rb', line 40
def scenarios_html
scenarios.map do |s|
begin
Scenario.new(s).render
rescue => e
RuntimeError.new([e, s]).render
end
end.join
end
|
#statistics_feature_html ⇒ Object
50
51
52
|
# File 'lib/turnip_formatter/renderer/html/index.rb', line 50
def statistics_feature_html
StatisticsFeature.new(scenarios).render
end
|
#statistics_speed_html ⇒ Object
58
59
60
|
# File 'lib/turnip_formatter/renderer/html/index.rb', line 58
def statistics_speed_html
StatisticsSpeed.new(scenarios).render
end
|
#statistics_tag_html ⇒ Object
54
55
56
|
# File 'lib/turnip_formatter/renderer/html/index.rb', line 54
def statistics_tag_html
StatisticsTag.new(scenarios).render
end
|
#title ⇒ Object
36
37
38
|
# File 'lib/turnip_formatter/renderer/html/index.rb', line 36
def title
Html.project_name + ' report'
end
|
#total_time ⇒ Object
68
69
70
|
# File 'lib/turnip_formatter/renderer/html/index.rb', line 68
def total_time
@resource[:total_time].to_s
end
|
#turnip_version ⇒ Object
72
73
74
|
# File 'lib/turnip_formatter/renderer/html/index.rb', line 72
def turnip_version
Turnip::VERSION
end
|