turnip_formatter 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/Rakefile +13 -1
- data/lib/rspec/core/formatters/turnip_formatter/for_rspec2.rb +8 -13
- data/lib/rspec/core/formatters/turnip_formatter/for_rspec3.rb +8 -13
- data/lib/rspec/core/formatters/turnip_formatter.rb +6 -21
- data/lib/turnip_formatter/ext/turnip/rspec.rb +19 -77
- data/lib/turnip_formatter/printer/runtime_error.rb +7 -9
- data/lib/turnip_formatter/printer.rb +4 -4
- data/lib/turnip_formatter/scenario/base.rb +1 -5
- data/lib/turnip_formatter/scenario/failure.rb +24 -14
- data/lib/turnip_formatter/scenario/pending.rb +22 -16
- data/lib/turnip_formatter/step.rb +12 -6
- data/lib/turnip_formatter/step_template/base.rb +5 -1
- data/lib/turnip_formatter/step_template/exception.rb +14 -29
- data/lib/turnip_formatter/step_template/exception.slim +10 -0
- data/lib/turnip_formatter/step_template/source.rb +13 -11
- data/lib/turnip_formatter/template/exception.slim +8 -0
- data/lib/turnip_formatter/template/index.slim +86 -0
- data/lib/turnip_formatter/template/runtime_exception.slim +13 -0
- data/lib/turnip_formatter/template/scenario.slim +15 -0
- data/lib/turnip_formatter/template/step.slim +6 -0
- data/lib/turnip_formatter/template/step_multiline.slim +1 -0
- data/lib/turnip_formatter/template/step_outline.slim +6 -0
- data/lib/turnip_formatter/template/tab_feature_statistics.slim +18 -0
- data/lib/turnip_formatter/template/tab_speed_statistics.slim +16 -0
- data/lib/turnip_formatter/template/tab_tag_statistics.slim +18 -0
- data/lib/turnip_formatter/template/turnip_formatter.css +1 -0
- data/lib/turnip_formatter/template.rb +20 -35
- data/lib/turnip_formatter/version.rb +1 -1
- data/spec/support/example_helper.rb +16 -17
- data/spec/support/step_helper.rb +1 -1
- data/spec/turnip_formatter/printer/tab_speed_statistics_spec.rb +1 -1
- data/spec/turnip_formatter/scenario/failure_spec.rb +28 -1
- data/spec/turnip_formatter/scenario/pending_spec.rb +24 -1
- data/spec/turnip_formatter/step_template/exception_spec.rb +2 -2
- data/spec/turnip_formatter/template_spec.rb +114 -2
- data/turnip_formatter.gemspec +4 -5
- metadata +42 -54
- data/lib/turnip_formatter/template/exception.haml +0 -8
- data/lib/turnip_formatter/template/index.haml +0 -88
- data/lib/turnip_formatter/template/runtime_exception.haml +0 -13
- data/lib/turnip_formatter/template/scenario.haml +0 -14
- data/lib/turnip_formatter/template/step.haml +0 -6
- data/lib/turnip_formatter/template/step_multiline.haml +0 -1
- data/lib/turnip_formatter/template/step_outline.haml +0 -6
- data/lib/turnip_formatter/template/tab_feature_statistics.haml +0 -18
- data/lib/turnip_formatter/template/tab_speed_statistics.haml +0 -16
- data/lib/turnip_formatter/template/tab_tag_statistics.haml +0 -18
@@ -1,88 +0,0 @@
|
|
1
|
-
!!! 5
|
2
|
-
%html
|
3
|
-
%head
|
4
|
-
%meta{ :charset => "UTF-8" }
|
5
|
-
%title= TurnipFormatter::Template.project_name + ' report'
|
6
|
-
|
7
|
-
= TurnipFormatter::Template.render_stylesheet_links
|
8
|
-
%style= TurnipFormatter::Template.render_stylesheet_codes
|
9
|
-
|
10
|
-
%script{ src: 'http://code.jquery.com/jquery-1.11.0.min.js' }
|
11
|
-
%script{ src: 'http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js' }
|
12
|
-
%script{ src: 'http://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.17.0/jquery.tablesorter.min.js' }
|
13
|
-
|
14
|
-
= TurnipFormatter::Template.render_javascript_links
|
15
|
-
%script= TurnipFormatter::Template.render_javascript_codes
|
16
|
-
|
17
|
-
%body
|
18
|
-
%header#report
|
19
|
-
.container
|
20
|
-
.page-header
|
21
|
-
%h1= TurnipFormatter::Template.project_name + ' Report'
|
22
|
-
|
23
|
-
%section#status_display_switch
|
24
|
-
%label{ for: 'passed_check' }
|
25
|
-
%input#passed_check{ type: 'checkbox' }
|
26
|
-
Passed
|
27
|
-
%label{ for: 'failed_check' }
|
28
|
-
%input#failed_check{ type: 'checkbox', checked: 'checked' }
|
29
|
-
Failed
|
30
|
-
%label{ for: 'pending_check' }
|
31
|
-
%input#pending_check{ type: 'checkbox' }
|
32
|
-
Pending
|
33
|
-
|
34
|
-
%section.result
|
35
|
-
%p
|
36
|
-
%span#total_count&= scenarios.size
|
37
|
-
Scenario (
|
38
|
-
%span#failed_count&= failed_count
|
39
|
-
failed
|
40
|
-
%span#pending_count&= pending_count
|
41
|
-
pending).
|
42
|
-
%p
|
43
|
-
Finished in
|
44
|
-
%span#total_time&= total_time.to_s + ' sec'
|
45
|
-
|
46
|
-
#main.container{ role: 'main' }
|
47
|
-
%ul#statistics{ class: 'nav nav-tabs' }
|
48
|
-
%li.active
|
49
|
-
%a{ href: '#steps-statistics', data: { toggle: 'tab' } } Steps
|
50
|
-
%li
|
51
|
-
%a{ href: '#speed-statistics', data: { toggle: 'tab' } } Speed Statistics
|
52
|
-
%li
|
53
|
-
%a{ href: '#feature-statistics', data: { toggle: 'tab' } } Feature Statistics
|
54
|
-
%li
|
55
|
-
%a{ href: '#tag-statistics', data: { toggle: 'tab' } } Tag Statistics
|
56
|
-
|
57
|
-
.tab-content
|
58
|
-
#steps-statistics{ class: 'tab-pane active' }
|
59
|
-
.checkbox
|
60
|
-
%label
|
61
|
-
%input#scenario_display_check{ type: 'checkbox', checked: 'checked' }
|
62
|
-
Folding
|
63
|
-
#scenarios.panel-group
|
64
|
-
- scenario_files.each do |f|
|
65
|
-
= File.read(f)
|
66
|
-
|
67
|
-
#feature-statistics.tab-pane
|
68
|
-
%h4 The results for the feature:
|
69
|
-
= TurnipFormatter::Printer::TabFeatureStatistics.print_out(scenarios)
|
70
|
-
|
71
|
-
#tag-statistics.tab-pane
|
72
|
-
%h4 The results for the tab:
|
73
|
-
= TurnipFormatter::Printer::TabTagStatistics.print_out(scenarios)
|
74
|
-
|
75
|
-
#speed-statistics.tab-pane
|
76
|
-
%h4 Ranking of running time of each <strong>successfully</strong> scenario:
|
77
|
-
= TurnipFormatter::Printer::TabSpeedStatistics.print_out(scenarios)
|
78
|
-
|
79
|
-
%footer
|
80
|
-
%p
|
81
|
-
Generated by
|
82
|
-
%a{ href: 'https://rubygems.org/gems/turnip_formatter'} turnip_formatter
|
83
|
-
= TurnipFormatter::VERSION
|
84
|
-
%p
|
85
|
-
Powered by
|
86
|
-
%a{ href: 'http://jquery.com/' } jQuery 1.11.0
|
87
|
-
and
|
88
|
-
%a{ href: 'http://mottie.github.io/tablesorter/' } tablesorter 2.17.0
|
@@ -1,13 +0,0 @@
|
|
1
|
-
%section.exception
|
2
|
-
%h1 TurnipFormatter RuntimeError
|
3
|
-
%dl
|
4
|
-
= runtime_exception
|
5
|
-
|
6
|
-
%dt Example Full Description
|
7
|
-
%dd&= example.metadata[:full_description]
|
8
|
-
|
9
|
-
= example_exception
|
10
|
-
|
11
|
-
- if example.pending
|
12
|
-
%dt Example Pending description
|
13
|
-
%dd&= example.metadata[:description]
|
@@ -1,14 +0,0 @@
|
|
1
|
-
%section{ class: "scenario #{scenario.status}", id: scenario.id }
|
2
|
-
%div.scenario-title
|
3
|
-
%span.permalink
|
4
|
-
%a{ href: "##{scenario.id}"} ¶
|
5
|
-
%span{ data: { toggle: "collapse", target: "##{scenario.id}_body" } }
|
6
|
-
&= "Scenario: #{scenario.name} Feature #{scenario.feature_info} at #{scenario.run_time} sec"
|
7
|
-
%div{ class: "panel-collapse collapse", id: "#{scenario.id}_body" }
|
8
|
-
%div.panel-body
|
9
|
-
%ul.tags
|
10
|
-
- scenario.tags.each do |tag|
|
11
|
-
%li @#{tag}
|
12
|
-
%div.steps
|
13
|
-
- scenario.steps.each do |step|
|
14
|
-
= TurnipFormatter::Printer::Step.print_out(step)
|
@@ -1 +0,0 @@
|
|
1
|
-
%pre.multiline&= lines
|
@@ -1,18 +0,0 @@
|
|
1
|
-
%table
|
2
|
-
%thead
|
3
|
-
%tr
|
4
|
-
%th Feature
|
5
|
-
%th Scearios
|
6
|
-
%th passed
|
7
|
-
%th failed
|
8
|
-
%th pending
|
9
|
-
%th status
|
10
|
-
%tbody
|
11
|
-
- analysis_results.each do |info|
|
12
|
-
%tr
|
13
|
-
%td= info.name
|
14
|
-
%td= info.scenario_count
|
15
|
-
%td= info.passed_count
|
16
|
-
%td= info.failed_count
|
17
|
-
%td= info.pending_count
|
18
|
-
%td{ class: info.status }= info.status
|
@@ -1,18 +0,0 @@
|
|
1
|
-
%table
|
2
|
-
%thead
|
3
|
-
%tr
|
4
|
-
%th Tag
|
5
|
-
%th Scearios
|
6
|
-
%th passed
|
7
|
-
%th failed
|
8
|
-
%th pending
|
9
|
-
%th status
|
10
|
-
%tbody
|
11
|
-
- analysis_results.each do |info|
|
12
|
-
%tr
|
13
|
-
%td&= info.name
|
14
|
-
%td&= info.scenario_count
|
15
|
-
%td&= info.passed_count
|
16
|
-
%td&= info.failed_count
|
17
|
-
%td&= info.pending_count
|
18
|
-
%td{ class: info.status }&= info.status
|