turnip_formatter 0.2.11 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -0
  3. data/README.md +18 -22
  4. data/example/README.md +6 -8
  5. data/example/images/background.png +0 -0
  6. data/example/images/basic_step.png +0 -0
  7. data/example/images/failed_step.png +0 -0
  8. data/example/images/multiline.png +0 -0
  9. data/example/images/outline.png +0 -0
  10. data/example/images/pending_step.png +0 -0
  11. data/example/spec/bar.js +1 -0
  12. data/example/spec/foo.css +3 -0
  13. data/example/spec/spec_helper.rb +7 -2
  14. data/lib/rspec/core/formatters/turnip_formatter.rb +32 -19
  15. data/lib/turnip_formatter/printer/index.rb +6 -9
  16. data/lib/turnip_formatter/printer/scenario.rb +4 -2
  17. data/lib/turnip_formatter/printer/step.rb +16 -14
  18. data/lib/turnip_formatter/printer/step_extra_args.rb +2 -0
  19. data/lib/turnip_formatter/printer/tab_speed_statistics.rb +2 -1
  20. data/lib/turnip_formatter/printer/tab_tag_statistics.rb +5 -6
  21. data/lib/turnip_formatter/printer.rb +6 -11
  22. data/lib/turnip_formatter/scenario/base.rb +98 -0
  23. data/lib/turnip_formatter/scenario/failure.rb +19 -21
  24. data/lib/turnip_formatter/scenario/pass.rb +2 -13
  25. data/lib/turnip_formatter/scenario/pending.rb +19 -25
  26. data/lib/turnip_formatter/step.rb +8 -38
  27. data/lib/turnip_formatter/step_template/base.rb +34 -0
  28. data/lib/turnip_formatter/step_template/exception.rb +59 -50
  29. data/lib/turnip_formatter/step_template/source.rb +36 -34
  30. data/lib/turnip_formatter/template/exception.haml +8 -0
  31. data/lib/turnip_formatter/template/index.haml +88 -0
  32. data/lib/turnip_formatter/template/runtime_exception.haml +13 -0
  33. data/lib/turnip_formatter/template/scenario.haml +14 -0
  34. data/lib/turnip_formatter/template/step.haml +6 -0
  35. data/lib/turnip_formatter/template/step_multiline.haml +1 -0
  36. data/lib/turnip_formatter/template/step_outline.haml +6 -0
  37. data/lib/turnip_formatter/template/tab_feature_statistics.haml +18 -0
  38. data/lib/turnip_formatter/template/tab_speed_statistics.haml +16 -0
  39. data/lib/turnip_formatter/template/tab_tag_statistics.haml +18 -0
  40. data/lib/turnip_formatter/template/turnip_formatter.js +8 -25
  41. data/lib/turnip_formatter/template/turnip_formatter.scss +102 -174
  42. data/lib/turnip_formatter/template.rb +65 -39
  43. data/lib/turnip_formatter/version.rb +1 -1
  44. data/lib/turnip_formatter.rb +45 -7
  45. data/spec/spec_helper.rb +6 -1
  46. data/spec/support/example_helper.rb +36 -0
  47. data/spec/support/step_helper.rb +27 -0
  48. data/spec/turnip_formatter/printer/index_spec.rb +10 -10
  49. data/spec/turnip_formatter/printer/scenario_spec.rb +29 -23
  50. data/spec/turnip_formatter/printer/step_extra_args_spec.rb +6 -6
  51. data/spec/turnip_formatter/printer/step_spec.rb +36 -69
  52. data/spec/turnip_formatter/printer/tab_feature_statistics_spec.rb +1 -4
  53. data/spec/turnip_formatter/printer/tab_speed_statistics_spec.rb +1 -4
  54. data/spec/turnip_formatter/printer/tab_tag_statistics_spec.rb +1 -4
  55. data/spec/turnip_formatter/scenario/base_spec.rb +67 -0
  56. data/spec/turnip_formatter/scenario/failure_spec.rb +16 -38
  57. data/spec/turnip_formatter/scenario/pending_spec.rb +16 -39
  58. data/spec/turnip_formatter/step_template/base_spec.rb +82 -0
  59. data/spec/turnip_formatter/step_template/exception_spec.rb +25 -17
  60. data/spec/turnip_formatter/step_template/source_spec.rb +10 -13
  61. data/turnip_formatter.gemspec +15 -11
  62. metadata +83 -41
  63. data/example/images/tag_step.png +0 -0
  64. data/images/tab_feature_statistics.png +0 -0
  65. data/images/tab_speed_statistics.png +0 -0
  66. data/images/tab_steps.png +0 -0
  67. data/images/tab_steps_expanding.png +0 -0
  68. data/images/tab_tag_statistics.png +0 -0
  69. data/lib/turnip_formatter/ext/turnip/builder.rb +0 -47
  70. data/lib/turnip_formatter/scenario.rb +0 -89
  71. data/lib/turnip_formatter/step/dsl.rb +0 -33
  72. data/lib/turnip_formatter/step/failure.rb +0 -19
  73. data/lib/turnip_formatter/step/pending.rb +0 -19
  74. data/lib/turnip_formatter/step_template.rb +0 -8
  75. data/lib/turnip_formatter/template/exception.erb +0 -10
  76. data/lib/turnip_formatter/template/exception_backtrace.erb +0 -7
  77. data/lib/turnip_formatter/template/index.erb +0 -70
  78. data/lib/turnip_formatter/template/runtime_exception.erb +0 -16
  79. data/lib/turnip_formatter/template/scenario.erb +0 -25
  80. data/lib/turnip_formatter/template/section_report.erb +0 -15
  81. data/lib/turnip_formatter/template/step.erb +0 -4
  82. data/lib/turnip_formatter/template/step_multiline.erb +0 -1
  83. data/lib/turnip_formatter/template/step_outline.erb +0 -9
  84. data/lib/turnip_formatter/template/tab_feature_statistics.erb +0 -24
  85. data/lib/turnip_formatter/template/tab_speed_statistics.erb +0 -18
  86. data/lib/turnip_formatter/template/tab_tag_statistics.erb +0 -24
  87. data/spec/rspec/core/formatters/turnip_formatter_spec.rb +0 -78
  88. data/spec/support/shared_context_examples.rb +0 -39
  89. data/spec/turnip_formatter/scenario/pass_spec.rb +0 -54
  90. data/spec/turnip_formatter/step/failure_spec.rb +0 -64
  91. data/spec/turnip_formatter/step/pending_spec.rb +0 -63
  92. data/spec/turnip_formatter/step_spec.rb +0 -86
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turnip_formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wataru MIYAGUNI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-27 00:00:00.000000000 Z
11
+ date: 2014-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: turnip
@@ -16,14 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.2.0
19
+ version: 1.2.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.2.0
26
+ version: 1.2.2
27
+ - !ruby/object:Gem::Dependency
28
+ name: tilt
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: haml
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: sass
29
57
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +66,34 @@ dependencies:
38
66
  - - ">="
39
67
  - !ruby/object:Gem::Version
40
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: bootstrap-sass
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 2.14.0
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 2.14.0
41
97
  - !ruby/object:Gem::Dependency
42
98
  name: bundler
43
99
  requirement: !ruby/object:Gem::Requirement
@@ -131,23 +187,18 @@ files:
131
187
  - example/images/multiline.png
132
188
  - example/images/outline.png
133
189
  - example/images/pending_step.png
134
- - example/images/tag_step.png
190
+ - example/spec/bar.js
135
191
  - example/spec/features/battle.feature
136
192
  - example/spec/features/battle2.feature
137
193
  - example/spec/features/battle3.feature
138
194
  - example/spec/features/songs.feature
195
+ - example/spec/foo.css
139
196
  - example/spec/spec_helper.rb
140
197
  - example/spec/steps/escape_steps.rb
141
198
  - example/spec/steps/spell_steps.rb
142
199
  - example/spec/steps/steps.rb
143
- - images/tab_feature_statistics.png
144
- - images/tab_speed_statistics.png
145
- - images/tab_steps.png
146
- - images/tab_steps_expanding.png
147
- - images/tab_tag_statistics.png
148
200
  - lib/rspec/core/formatters/turnip_formatter.rb
149
201
  - lib/turnip_formatter.rb
150
- - lib/turnip_formatter/ext/turnip/builder.rb
151
202
  - lib/turnip_formatter/ext/turnip/rspec.rb
152
203
  - lib/turnip_formatter/printer.rb
153
204
  - lib/turnip_formatter/printer/index.rb
@@ -158,37 +209,32 @@ files:
158
209
  - lib/turnip_formatter/printer/tab_feature_statistics.rb
159
210
  - lib/turnip_formatter/printer/tab_speed_statistics.rb
160
211
  - lib/turnip_formatter/printer/tab_tag_statistics.rb
161
- - lib/turnip_formatter/scenario.rb
212
+ - lib/turnip_formatter/scenario/base.rb
162
213
  - lib/turnip_formatter/scenario/failure.rb
163
214
  - lib/turnip_formatter/scenario/pass.rb
164
215
  - lib/turnip_formatter/scenario/pending.rb
165
216
  - lib/turnip_formatter/step.rb
166
- - lib/turnip_formatter/step/dsl.rb
167
- - lib/turnip_formatter/step/failure.rb
168
- - lib/turnip_formatter/step/pending.rb
169
- - lib/turnip_formatter/step_template.rb
217
+ - lib/turnip_formatter/step_template/base.rb
170
218
  - lib/turnip_formatter/step_template/exception.rb
171
219
  - lib/turnip_formatter/step_template/source.rb
172
220
  - lib/turnip_formatter/template.rb
173
- - lib/turnip_formatter/template/exception.erb
174
- - lib/turnip_formatter/template/exception_backtrace.erb
175
- - lib/turnip_formatter/template/index.erb
176
- - lib/turnip_formatter/template/runtime_exception.erb
177
- - lib/turnip_formatter/template/scenario.erb
178
- - lib/turnip_formatter/template/section_report.erb
179
- - lib/turnip_formatter/template/step.erb
180
- - lib/turnip_formatter/template/step_multiline.erb
181
- - lib/turnip_formatter/template/step_outline.erb
182
- - lib/turnip_formatter/template/tab_feature_statistics.erb
183
- - lib/turnip_formatter/template/tab_speed_statistics.erb
184
- - lib/turnip_formatter/template/tab_tag_statistics.erb
221
+ - lib/turnip_formatter/template/exception.haml
222
+ - lib/turnip_formatter/template/index.haml
223
+ - lib/turnip_formatter/template/runtime_exception.haml
224
+ - lib/turnip_formatter/template/scenario.haml
225
+ - lib/turnip_formatter/template/step.haml
226
+ - lib/turnip_formatter/template/step_multiline.haml
227
+ - lib/turnip_formatter/template/step_outline.haml
228
+ - lib/turnip_formatter/template/tab_feature_statistics.haml
229
+ - lib/turnip_formatter/template/tab_speed_statistics.haml
230
+ - lib/turnip_formatter/template/tab_tag_statistics.haml
185
231
  - lib/turnip_formatter/template/turnip_formatter.js
186
232
  - lib/turnip_formatter/template/turnip_formatter.scss
187
233
  - lib/turnip_formatter/version.rb
188
- - spec/rspec/core/formatters/turnip_formatter_spec.rb
189
234
  - spec/spec_helper.rb
235
+ - spec/support/example_helper.rb
190
236
  - spec/support/passed.feature
191
- - spec/support/shared_context_examples.rb
237
+ - spec/support/step_helper.rb
192
238
  - spec/turnip_formatter/printer/index_spec.rb
193
239
  - spec/turnip_formatter/printer/scenario_spec.rb
194
240
  - spec/turnip_formatter/printer/step_extra_args_spec.rb
@@ -196,12 +242,10 @@ files:
196
242
  - spec/turnip_formatter/printer/tab_feature_statistics_spec.rb
197
243
  - spec/turnip_formatter/printer/tab_speed_statistics_spec.rb
198
244
  - spec/turnip_formatter/printer/tab_tag_statistics_spec.rb
245
+ - spec/turnip_formatter/scenario/base_spec.rb
199
246
  - spec/turnip_formatter/scenario/failure_spec.rb
200
- - spec/turnip_formatter/scenario/pass_spec.rb
201
247
  - spec/turnip_formatter/scenario/pending_spec.rb
202
- - spec/turnip_formatter/step/failure_spec.rb
203
- - spec/turnip_formatter/step/pending_spec.rb
204
- - spec/turnip_formatter/step_spec.rb
248
+ - spec/turnip_formatter/step_template/base_spec.rb
205
249
  - spec/turnip_formatter/step_template/exception_spec.rb
206
250
  - spec/turnip_formatter/step_template/source_spec.rb
207
251
  - spec/turnip_formatter/template_spec.rb
@@ -226,15 +270,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
270
  version: '0'
227
271
  requirements: []
228
272
  rubyforge_project:
229
- rubygems_version: 2.2.0
273
+ rubygems_version: 2.2.2
230
274
  signing_key:
231
275
  specification_version: 4
232
276
  summary: RSpec custom formatter for Turnip
233
277
  test_files:
234
- - spec/rspec/core/formatters/turnip_formatter_spec.rb
235
278
  - spec/spec_helper.rb
279
+ - spec/support/example_helper.rb
236
280
  - spec/support/passed.feature
237
- - spec/support/shared_context_examples.rb
281
+ - spec/support/step_helper.rb
238
282
  - spec/turnip_formatter/printer/index_spec.rb
239
283
  - spec/turnip_formatter/printer/scenario_spec.rb
240
284
  - spec/turnip_formatter/printer/step_extra_args_spec.rb
@@ -242,12 +286,10 @@ test_files:
242
286
  - spec/turnip_formatter/printer/tab_feature_statistics_spec.rb
243
287
  - spec/turnip_formatter/printer/tab_speed_statistics_spec.rb
244
288
  - spec/turnip_formatter/printer/tab_tag_statistics_spec.rb
289
+ - spec/turnip_formatter/scenario/base_spec.rb
245
290
  - spec/turnip_formatter/scenario/failure_spec.rb
246
- - spec/turnip_formatter/scenario/pass_spec.rb
247
291
  - spec/turnip_formatter/scenario/pending_spec.rb
248
- - spec/turnip_formatter/step/failure_spec.rb
249
- - spec/turnip_formatter/step/pending_spec.rb
250
- - spec/turnip_formatter/step_spec.rb
292
+ - spec/turnip_formatter/step_template/base_spec.rb
251
293
  - spec/turnip_formatter/step_template/exception_spec.rb
252
294
  - spec/turnip_formatter/step_template/source_spec.rb
253
295
  - spec/turnip_formatter/template_spec.rb
Binary file
Binary file
Binary file
data/images/tab_steps.png DELETED
Binary file
Binary file
Binary file
@@ -1,47 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- require 'turnip/builder'
4
-
5
- module Turnip
6
- class Builder
7
- class ScenarioOutline
8
- def to_scenarios(examples)
9
- rows = examples.rows.map(&:cells)
10
- headers = rows.shift
11
- rows.map do |row|
12
- Scenario.new(@raw).tap do |scenario|
13
- scenario.steps = steps.map do |step|
14
- new_description = substitute(step.description, headers, row)
15
- new_extra_args = step.extra_args.map do |ea|
16
- next ea unless ea.instance_of?(Turnip::Table)
17
- Turnip::Table.new(ea.map {|t_row| t_row.map {|t_col| substitute(t_col, headers, row) } })
18
- end
19
- Step1.new(new_description, new_extra_args, step.line, step.keyword)
20
- end
21
- end
22
- end
23
- end
24
- end
25
-
26
- class Step1 < Struct.new(:description, :extra_args, :line, :keyword)
27
- def split(*args)
28
- self.to_s.split(*args)
29
- end
30
-
31
- def to_s
32
- description
33
- end
34
- end
35
-
36
- def step(step)
37
- extra_args = []
38
- if step.doc_string
39
- extra_args.push step.doc_string.value
40
- elsif step.rows
41
- table = Turnip::Table.new(step.rows.map(&:cells).map(&:to_a))
42
- extra_args.push(table)
43
- end
44
- @current_step_context.steps << Step1.new(step.name, extra_args, step.line, step.keyword)
45
- end
46
- end
47
- end
@@ -1,89 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- require 'turnip_formatter/step'
4
-
5
- module TurnipFormatter
6
- module Scenario
7
- include RSpec::Core::BacktraceFormatter
8
-
9
- class NotExistStepsInformationError < ::StandardError; end
10
- class NoFeatureFileError < ::StandardError; end
11
-
12
- #
13
- # @param [RSpec::Core::Example] example
14
- #
15
- def initialize(example)
16
- @example = example
17
- clean_backtrace
18
- end
19
-
20
- def validation
21
- raise NotExistStepsInformationError unless example.metadata.member?(:turnip_formatter)
22
- raise NoFeatureFileError unless feature_file_path.end_with?('.feature')
23
- end
24
-
25
- def steps
26
- @steps ||= descriptions.map do |desc|
27
- TurnipFormatter::Step.new(example, desc)
28
- end
29
- end
30
-
31
- def id
32
- "step_" + object_id.to_s
33
- end
34
-
35
- #
36
- # @return [String] scenario name
37
- #
38
- def name
39
- example.example_group.description
40
- end
41
-
42
- #
43
- # @return [String] scenario status ('passed', 'failed' or 'pending')
44
- #
45
- def status
46
- example.execution_result[:status]
47
- end
48
-
49
- #
50
- # @return [String] scenario run time
51
- #
52
- def run_time
53
- example.execution_result[:run_time]
54
- end
55
-
56
- def feature_info
57
- path = RSpec::Core::Metadata::relative_path(feature_file_path)
58
- "\"#{feature_name}\" in #{path}"
59
- end
60
-
61
- def feature_name
62
- example.example_group.metadata[:example_group][:example_group][:description]
63
- end
64
-
65
- def feature_file_path
66
- example.metadata[:file_path]
67
- end
68
-
69
- def tags
70
- example.metadata[:turnip_formatter][:tags]
71
- end
72
-
73
- def example
74
- @example
75
- end
76
-
77
- private
78
-
79
- def descriptions
80
- example.metadata[:turnip_formatter][:steps]
81
- end
82
-
83
- def clean_backtrace
84
- return if example.exception.nil?
85
- formatted = format_backtrace(example.exception.backtrace, example.metadata)
86
- example.exception.set_backtrace(formatted)
87
- end
88
- end
89
- end
@@ -1,33 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- require 'turnip_formatter/step'
4
-
5
- module TurnipFormatter
6
- class Step
7
- module DSL
8
- #
9
- # @param [TurnipFormatter::Step] step
10
- #
11
- def extended(step)
12
- templates.each do |style, template|
13
- step.docs[style] = {
14
- klass: template[:klass],
15
- value: step.instance_eval(&template[:block])
16
- }
17
- end
18
- end
19
-
20
- def add_template(klass, &block)
21
- ::TurnipFormatter::Step.add_template(status, klass, &block)
22
- end
23
-
24
- def remove_template(klass)
25
- ::TurnipFormatter::Step.remove_template(status, klass)
26
- end
27
-
28
- def templates
29
- ::TurnipFormatter::Step.templates[status] || []
30
- end
31
- end
32
- end
33
- end
@@ -1,19 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- require 'turnip_formatter/step'
3
- require 'turnip_formatter/step/dsl'
4
-
5
- module TurnipFormatter
6
- class Step
7
- module Failure
8
- extend DSL
9
-
10
- def self.status
11
- :failure
12
- end
13
-
14
- def status
15
- Failure.status
16
- end
17
- end
18
- end
19
- end
@@ -1,19 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- require 'turnip_formatter/step'
3
- require 'turnip_formatter/step/dsl'
4
-
5
- module TurnipFormatter
6
- class Step
7
- module Pending
8
- extend DSL
9
-
10
- def self.status
11
- :pending
12
- end
13
-
14
- def status
15
- Pending.status
16
- end
17
- end
18
- end
19
- end
@@ -1,8 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- module TurnipFormatter
4
- module StepTemplate
5
- require 'turnip_formatter/step_template/exception'
6
- require 'turnip_formatter/step_template/source'
7
- end
8
- end
@@ -1,10 +0,0 @@
1
- <dt><%= h(title) %> Exception</dt>
2
- <dd><%= h(exception.to_s) %></dd>
3
- <dt><%= h(title) %> Exception Backtrace</dt>
4
- <dd>
5
- <ol>
6
- <% exception.backtrace.each do |line| %>
7
- <li><%= h(line) %></li>
8
- <% end %>
9
- </ol>
10
- </dd>
@@ -1,7 +0,0 @@
1
- <dd>
2
- <ol>
3
- <% backtrace.each do |line| %>
4
- <li><%= h(line) %></li>
5
- <% end %>
6
- </ol>
7
- </dd>
@@ -1,70 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="UTF-8">
5
- <title><%= TurnipFormatter::Template.project_name %> report</title>
6
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
7
- <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
8
- <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.9.1/jquery.tablesorter.min.js"></script>
9
-
10
- <%= TurnipFormatter::Template.js_file_render %>
11
-
12
- <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/smoothness/jquery-ui.css">
13
-
14
- <style><%= TurnipFormatter::Template.css_render %></style>
15
- <script><%= TurnipFormatter::Template.js_render %></script>
16
-
17
- <%= TurnipFormatter::Template.css_file_render %>
18
- </head>
19
- <body>
20
- <div id="report">
21
- <h1><%= TurnipFormatter::Template.project_name %> Report</h1>
22
- <section class="checkbox">
23
- <label for="passed_check">Passed</label><input type="checkbox" id="passed_check">
24
- <label for="failed_check">Failed</label><input type="checkbox" checked id="failed_check">
25
- <label for="pending_check">Pending</label><input type="checkbox" id="pending_check">
26
- </section>
27
-
28
- <section class="result">
29
- <p>
30
- <span id="total_count"><%= h(scenarios.size) %></span> Scenario
31
- (<span id="failed_count"><%= h(failed_count) %></span> failed
32
- <span id="pending_count"><%= h(pending_count) %></span> pending).
33
- </p>
34
- <p>Finished in <span id="total_time"><%= h(total_time) %></span></p>
35
- </section>
36
- </div>
37
-
38
- <div id="main" role="main">
39
- <ul>
40
- <li><a href="#steps-statistics">Steps</a></li>
41
- <li><a href="#speed-statistics">Speed Statistics</a></li>
42
- <li><a href="#feature-statistics">Feature Statistics</a></li>
43
- <li><a href="#tag-statistics">Tag Statistics</a></li>
44
- </ul>
45
- <div id="steps-statistics">
46
- <label><input type="checkbox" id="scenario_display_check" checked>step folding</label>
47
- <% scenarios.each do |scenario| %>
48
- <%= TurnipFormatter::Printer::Scenario.print_out(scenario) %>
49
- <% end %>
50
- </div>
51
- <div id="feature-statistics">
52
- <em>The results for the feature:</em>
53
- <%= TurnipFormatter::Printer::TabFeatureStatistics.print_out(scenarios) %>
54
- </div>
55
- <div id="tag-statistics">
56
- <em>The results for the tab:</em>
57
- <%= TurnipFormatter::Printer::TabTagStatistics.print_out(scenarios) %>
58
- </div>
59
- <div id="speed-statistics">
60
- <em>Ranking of running time of each <strong>successfully</strong> scenario:</em>
61
- <%= TurnipFormatter::Printer::TabSpeedStatistics.print_out(passed_scenarios) %>
62
- </div>
63
- </div>
64
-
65
- <footer>
66
- <p>Generated by <a href="https://rubygems.org/gems/turnip_formatter">turnip_formatter</a> <%= TurnipFormatter::VERSION %></p>
67
- <p>Powered by <a href="http://jquery.com/">jQuery</a> 1.9.1, <a href="http://jqueryui.com/">jQuery UI</a> 1.10.2 and <a href="http://mottie.github.io/tablesorter/">tablesorter</a> 2.9.1</p>
68
- </footer>
69
- </body>
70
- </html>
@@ -1,16 +0,0 @@
1
- <section class="exception">
2
- <h1>TurnipFormatter RuntimeError</h1>
3
- <dl>
4
- <%= runtime_exception %>
5
-
6
- <dt>Example Full Description</dt>
7
- <dd><%= h(example.metadata[:full_description]) %></dd>
8
-
9
- <%= example_exception %>
10
-
11
- <% if example.pending %>
12
- <dt>Example Pending description</dt>
13
- <dd><%= h(example.metadata[:description]) %></dd>
14
- <% end %>
15
- </dl>
16
- </section>
@@ -1,25 +0,0 @@
1
- <section class="scenario <%= h(scenario.status) %>">
2
- <header>
3
- <span class="permalink">
4
- <a href="#<%= scenario.id %>">&para;</a>
5
- </span>
6
- <span class="scenario_name" id="<%= scenario.id %>">
7
- Scenario: <%= h(scenario.name) %>
8
- </span>
9
- <span class="feature_name">
10
- (Feature: <%= h(scenario.feature_info) %>) at <%= h(scenario.run_time) %> sec
11
- </span>
12
- </header>
13
-
14
- <ul class="tags">
15
- <% scenario.tags.each do |tag| %>
16
- <li>@<%= h(tag) %></li>
17
- <% end %>
18
- </ul>
19
-
20
- <ul class="steps">
21
- <% scenario.steps.each do |step| %>
22
- <%= TurnipFormatter::Printer::Step.print_out(step) %>
23
- <% end %>
24
- </ul>
25
- </section>
@@ -1,15 +0,0 @@
1
- <div id="report">
2
- <h1>Turnip Report</h1>
3
- <section class="checkbox">
4
- <label for="passed_check">Passed</label><input type="checkbox" id="passed_check">
5
- <label for="failed_check">Failed</label><input type="checkbox" checked id="failed_check">
6
- <label for="pending_check">Pending</label><input type="checkbox" id="pending_check">
7
- </section>
8
-
9
- <section class="result">
10
- <p>
11
- <span id="total_count"></span> Scenario (<span id="failed_count"></span> failed <span id="pending_count"></span> pending).
12
- </p>
13
- <p>Finished in <span id="total_time"></span></p>
14
- </section>
15
- </div>
@@ -1,4 +0,0 @@
1
- <li class="step <%= step.status %>">
2
- <span><%= h(step.name) %></span>
3
- <div class="args"><%= step_docs %></div>
4
- </li>
@@ -1 +0,0 @@
1
- <pre class="multiline"><%= h(lines) %></pre>
@@ -1,9 +0,0 @@
1
- <table class="step_outline">
2
- <% table.each do |tr| %>
3
- <tr>
4
- <% tr.each do |td| %>
5
- <td><%= h(td) %></td>
6
- <% end %>
7
- </tr>
8
- <% end %>
9
- </table>
@@ -1,24 +0,0 @@
1
- <table>
2
- <thead>
3
- <tr>
4
- <th>Feature</th>
5
- <th>Scearios</th>
6
- <th>passed</th>
7
- <th>failed</th>
8
- <th>pending</th>
9
- <th>status</th>
10
- </tr>
11
- </thead>
12
- <tbody>
13
- <% analysis_results.each do |info| %>
14
- <tr>
15
- <td><%= info.name %></td>
16
- <td><%= info.scenario_count %></td>
17
- <td><%= info.passed_count %></td>
18
- <td><%= info.failed_count %></td>
19
- <td><%= info.pending_count %></td>
20
- <td class="<%= info.status %>"><%= info.status %></td>
21
- </tr>
22
- <% end %>
23
- </tbody>
24
- </table>
@@ -1,18 +0,0 @@
1
- <table>
2
- <thead>
3
- <tr>
4
- <th>Feature</th>
5
- <th>Scenario</th>
6
- <th>Duration</th>
7
- </tr>
8
- </thead>
9
- <tbody>
10
- <% analysis_results.each do |info| %>
11
- <tr>
12
- <td><span><%= info.feature_name %></span></td>
13
- <td><a href="#<%= info.id %>"><%= info.name %></a></td>
14
- <td><span><%= info.run_time %></span> sec</td>
15
- </tr>
16
- <% end %>
17
- </tbody>
18
- </table>