cucumber-in-the-yard 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/History.txt +3 -0
  2. data/Manifest +51 -0
  3. data/README.txt +55 -0
  4. data/Rakefile +28 -0
  5. data/cucumber-in-the-yard.gemspec +42 -0
  6. data/example/example.feature +13 -0
  7. data/example/example.step.rb +48 -0
  8. data/example/example.third.feature +30 -0
  9. data/example/second_example.feature +36 -0
  10. data/lib/city.rb +23 -0
  11. data/lib/cucumber/city_builder.rb +130 -0
  12. data/lib/yard/code_objects/cucumber_location_helper.rb +15 -0
  13. data/lib/yard/code_objects/feature.rb +24 -0
  14. data/lib/yard/code_objects/scenario.rb +25 -0
  15. data/lib/yard/code_objects/step.rb +25 -0
  16. data/lib/yard/code_objects/tags.rb +63 -0
  17. data/lib/yard/extensions.rb +38 -0
  18. data/lib/yard/handlers/base.rb +21 -0
  19. data/lib/yard/handlers/feature_handler.rb +41 -0
  20. data/lib/yard/parser/feature.rb +46 -0
  21. data/lib/yard/rake/city_task.rb +12 -0
  22. data/lib/yard/rb_extensions.rb +152 -0
  23. data/lib/yard/templates/default/feature/html/feature.erb +243 -0
  24. data/lib/yard/templates/default/feature/setup.rb +5 -0
  25. data/lib/yard/templates/default/fulldoc/html/css/common.css +182 -0
  26. data/lib/yard/templates/default/fulldoc/html/full_list.erb +34 -0
  27. data/lib/yard/templates/default/fulldoc/html/full_list_features.erb +10 -0
  28. data/lib/yard/templates/default/fulldoc/html/full_list_scenarios.erb +10 -0
  29. data/lib/yard/templates/default/fulldoc/html/full_list_stepdefinitions.erb +11 -0
  30. data/lib/yard/templates/default/fulldoc/html/full_list_steps.erb +13 -0
  31. data/lib/yard/templates/default/fulldoc/html/full_list_tagusages.erb +10 -0
  32. data/lib/yard/templates/default/fulldoc/html/index.erb +24 -0
  33. data/lib/yard/templates/default/fulldoc/html/js/cucumber.js +13 -0
  34. data/lib/yard/templates/default/fulldoc/html/setup.rb +73 -0
  35. data/lib/yard/templates/default/layout/html/headers.erb +14 -0
  36. data/lib/yard/templates/default/layout/html/search.erb +8 -0
  37. data/lib/yard/templates/default/module/html/step_transforms.erb +23 -0
  38. data/lib/yard/templates/default/module/setup.rb +5 -0
  39. data/lib/yard/templates/default/scenario/html/scenario.erb +26 -0
  40. data/lib/yard/templates/default/scenario/setup.rb +5 -0
  41. data/lib/yard/templates/default/steptransformers/html/stepdefinition.erb +38 -0
  42. data/lib/yard/templates/default/steptransformers/setup.rb +5 -0
  43. data/lib/yard/templates/default/tagusage/html/tagusage.erb +65 -0
  44. data/lib/yard/templates/default/tagusage/setup.rb +5 -0
  45. data/spec/city/feature_parser_spec_examples.rb +153 -0
  46. data/spec/city/gherkin_loader_spec.rb +39 -0
  47. data/spec/city/test.feature +36 -0
  48. data/spec/city/yard_handlers_cucumber_spec.rb +24 -0
  49. data/spec/city/yard_namespace_object_spec.rb +8 -0
  50. data/spec/city/yard_parser_cucumber_spec.rb +215 -0
  51. data/spec/city/yard_rb_extensions_spec.rb +128 -0
  52. data/spec/spec_helper.rb +5 -0
  53. data.tar.gz.sig +0 -0
  54. metadata +201 -0
  55. metadata.gz.sig +0 -0
@@ -0,0 +1,182 @@
1
+
2
+ .feature {
3
+
4
+ }
5
+
6
+ .tags {
7
+ font-family: monospace;
8
+ font-size: 14px;
9
+ }
10
+
11
+
12
+ * .title {
13
+ padding: 10px;
14
+ font-size: 24px;
15
+ }
16
+
17
+ .feature > .title, .tag > .title {
18
+ margin: 20px 20px 10px 20px;
19
+ padding-left: 0px;
20
+ border-bottom: 1px solid #E3E3E3;
21
+ }
22
+
23
+ .meta .file {
24
+ float: right;
25
+ margin-right: 20px;
26
+ }
27
+
28
+ * .title .pre {
29
+ color: #696969;
30
+ }
31
+
32
+ * .title .name {
33
+ font-weight: bold;
34
+ color: #3F3F3F;
35
+ }
36
+
37
+ .meta {
38
+ margin-left: 30px;
39
+ color: gray;
40
+ }
41
+ .scenario .meta .tags {
42
+ margin-left: 0px;
43
+ }
44
+
45
+ .feature .description {
46
+ margin: 10px 20px 0px 30px;
47
+ padding: 10px 20px 20px 10px;
48
+ /* background-color: #F5F5F5;*/
49
+ color: #343332;
50
+ /* border: #C7C5C5 solid 1px;*/
51
+ font-family: 'Trebuchet MS', Arial, Helvetica;
52
+ }
53
+
54
+ .odd {
55
+ background-color: #F0F6F9;
56
+ }
57
+
58
+ .even {
59
+ background-color: #FFFFFF;
60
+ }
61
+
62
+
63
+ #background {
64
+ margin-top: 10px;
65
+ margin-left: 20px;
66
+ }
67
+
68
+ .scenario {
69
+ margin-top: 40px;
70
+ margin-left: 20px;
71
+ }
72
+
73
+
74
+ .scenario .title, #background .title {
75
+ font-size: 16px;
76
+ padding-left: 0px;
77
+ margin: 0px 20px 0px 10px;
78
+ border-bottom: 1px solid #E3E3E3;
79
+ }
80
+
81
+ #background .title .pre {
82
+ color: #346F97;
83
+ }
84
+
85
+
86
+ .scenario .steps, #background .steps {
87
+ margin: 20px 20px 0px 30px;
88
+ font-size: 12px;
89
+ }
90
+
91
+ .scenario .step, #background .step {
92
+ margin-top: 4px;
93
+ padding: 4px;
94
+ font-size: 14px;
95
+ font-weight: bold;
96
+ }
97
+
98
+ #background .title .name {}
99
+ #background .description {}
100
+
101
+ .scenario .title .name {}
102
+ .scenario .description {}
103
+
104
+ .scenario .title .pre {
105
+ color: #00AAD2;
106
+ }
107
+
108
+ .scenario .tags {
109
+ margin-left: 30px;
110
+ margin-top: 10px;
111
+ }
112
+
113
+ .step .predicate {
114
+ color: #5D5C5B;
115
+ }
116
+
117
+ .step .undefined {
118
+ border-bottom: 1px dashed #E99494;
119
+ }
120
+ .step .defined {}
121
+ .step .details {
122
+ float: right;
123
+ color: #343332;
124
+ }
125
+ .step .details .pre {}
126
+ .step .details .name {
127
+ font-family: monospace;
128
+ color: black;
129
+ }
130
+
131
+ .multiline, .text {
132
+ margin-top: 10px;
133
+ margin-left: 20px;
134
+ }
135
+
136
+ .text {
137
+ padding: 20px;
138
+ background-color: #F5F5F5;
139
+ color: #343332;
140
+ }
141
+
142
+
143
+ .outline {
144
+ margin-top: 20px;
145
+ margin-left: 40px;
146
+ }
147
+ .multiline table tr, .outline table tr {
148
+ padding: 4px;
149
+ }
150
+ .multiline table thead tr th, .outline table thead tr th {
151
+ text-align: left;
152
+ padding: 4px;
153
+ background-color: #A8C0A8;
154
+ }
155
+ .multiline table tr td, .outline table tr td {
156
+ width: 150px;
157
+ padding: 4px;
158
+ }
159
+
160
+
161
+ /* Overrides for scenarios in the tag view */
162
+ .tag .scenario {
163
+ margin-left: 30px;
164
+ margin-top: 0px;
165
+ }
166
+ .tag .scenario .title {
167
+ border-bottom: none;
168
+ }
169
+ /* Overrides for scenarios in the tag view */
170
+
171
+ .stepdef .title {
172
+ font-size: 14px;
173
+ margin-top: 30px;
174
+ border-bottom: 1px solid #E3E3E3;
175
+ }
176
+
177
+ .stepdef .steps {
178
+ margin: 10px 0px 0px 30px;
179
+ }
180
+ .stepdef .steps .step {
181
+ padding: 4px;
182
+ }
@@ -0,0 +1,34 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html>
4
+ <head>
5
+ <meta name="Content-Type" content="text/html; charset=<%= charset %>" />
6
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
7
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
8
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
9
+ <script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
10
+ <base id="base_target" target="_parent" />
11
+ </head>
12
+ <body>
13
+ <script type="text/javascript" charset="utf-8">
14
+ if (window.top.frames.main) {
15
+ document.getElementById('base_target').target = 'main';
16
+ document.body.className = 'frames';
17
+ }
18
+ </script>
19
+ <div id="content">
20
+ <h1 id="full_list_header"><%= @list_title %></h1>
21
+ <div id="nav">
22
+ <a target="_self" href="class_list.html">Classes</a> |
23
+ <a target="_self" href="method_list.html">Methods</a> |
24
+ <a target="_self" href="file_list.html">Files</a>
25
+ </div>
26
+ <div id="search">Search: <input type="text" /></div>
27
+
28
+ <ul id="full_list" class="<%= @list_type %>">
29
+ <%= erb "full_list_#{@list_type}" %>
30
+ </ul>
31
+ </div>
32
+ </body>
33
+ </html>
34
+
@@ -0,0 +1,10 @@
1
+ <% n = 1 %>
2
+ <% @features.each do |feature| %>
3
+ <li class="r<%= n %>">
4
+ <span class='object_link'>
5
+ <a href="<%= feature.filename %>"><%= h(feature.value) %></a>
6
+ </span>
7
+ <span class="">(<%= h(feature.file) %>)<span>
8
+ </li>
9
+ <% n = n == 2 ? 1 : 2 %>
10
+ <% end %>
@@ -0,0 +1,10 @@
1
+ <% n = 1 %>
2
+ <% @scenarios.each do |scenario| %>
3
+ <li class="r<%= n %>">
4
+ <span class='object_link'>
5
+ <a href="<%= scenario.feature.filename %>"><%= h(scenario.value) %></a>
6
+ </span>
7
+ <span class="">(<%= h(scenario.location) %>)<span>
8
+ </li>
9
+ <% n = n == 2 ? 1 : 2 %>
10
+ <% end %>
@@ -0,0 +1,11 @@
1
+ <% n = 1 %>
2
+ <% @step_definitions.each do |stepdef| %>
3
+ <li class="r<%= n %>">
4
+ <span class='object_link'>
5
+ <span class="pre"><%= stepdef.keyword %></span>
6
+ <a href="steptransformers.html#<%= stepdef.name %>"><span class="name"><%= h(stepdef.value) %></span></a>&nbsp;&nbsp;
7
+ </span>
8
+ <span class="">(<%= h("#{stepdef.files.first.first}:#{stepdef.files.first.last}") %>)<span>
9
+ </li>
10
+ <% n = n == 2 ? 1 : 2 %>
11
+ <% end %>
@@ -0,0 +1,13 @@
1
+ <% n = 1 %>
2
+ <% @steps.each do |step| %>
3
+ <li class="r<%= n %>">
4
+ <span class='object_link'>
5
+ <a href="<%= step.scenario.feature.filename %>">
6
+ <span class="pre"><%= step.keyword %></span>
7
+ <span class="name"><%= h(step.value) %></span>
8
+ </a>
9
+ </span>
10
+ <span class="">(<%= h(step.files.first.first) %>)<span>
11
+ </li>
12
+ <% n = n == 2 ? 1 : 2 %>
13
+ <% end %>
@@ -0,0 +1,10 @@
1
+ <% n = 1 %>
2
+ <% @tagusage.each do |usage| %>
3
+ <li class="r<%= n %>">
4
+ <span class='object_link'>
5
+ <a href="<%= usage.filename %>"><%= h(usage.value) %></a>
6
+ </span>
7
+ <small><%= usage.total_scenario_count %></small>
8
+ </li>
9
+ <% n = n == 2 ? 1 : 2 %>
10
+ <% end %>
@@ -0,0 +1,24 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <%= T('layout/headers') %>
6
+ </head>
7
+ <body>
8
+ <script type="text/javascript" charset="utf-8">
9
+ if (window.top.frames.main) document.body.className = 'frames';
10
+ </script>
11
+
12
+ <div id="header">
13
+ <%= T('layout/breadcrumb') %>
14
+ <%= T('layout/search') %>
15
+ <div class="clear"></div>
16
+ </div>
17
+
18
+ <iframe id="search_frame"></iframe>
19
+
20
+ <div id="content"><%= yieldall %></div>
21
+
22
+ <%= T('layout/footer') %>
23
+ </body>
24
+ </html>
@@ -0,0 +1,13 @@
1
+ function cucumberSearchFrameLinks() {
2
+ $('#feature_list_link').click(function() {
3
+ toggleSearchFrame(this, relpath + 'feature_list.html');
4
+ });
5
+ $('#tagusage_list_link').click(function() {
6
+ toggleSearchFrame(this, relpath + 'tagusage_list.html');
7
+ });
8
+ $('#scenario_list_link').click(function() {
9
+ toggleSearchFrame(this, relpath + 'scenario_list.html');
10
+ });
11
+ }
12
+
13
+ $(cucumberSearchFrameLinks);
@@ -0,0 +1,73 @@
1
+ include YARD::Templates::Helpers::HtmlHelper
2
+
3
+ def init
4
+ super
5
+ asset("js/cucumber.js",file("js/cucumber.js",true))
6
+
7
+ # Because I don't parse correctly I have to find all my scenarios, steps, and tags
8
+ @scenarios = []
9
+ @tags = []
10
+ @features = Registry.all(:feature)
11
+
12
+ @step_definitions = Registry.all(:stepdefinition)
13
+ @steps = Registry.all(:step)
14
+
15
+ create_full_list(@step_definitions,"Step Definition")
16
+ create_full_list(@steps)
17
+
18
+ @features.each do |feature|
19
+ serialize_object(feature)
20
+
21
+ feature.tags.each { |tag| @tags << tag }
22
+
23
+ feature.scenarios.each do |scenario|
24
+ @scenarios << scenario
25
+ scenario.tags.each { |tag| @tags << tag }
26
+ end
27
+ end
28
+
29
+ @tags = find_unique_tags(@tags)
30
+ @tags.each { |tag,tag_objects| serialize_object(tag_objects) }
31
+ @tagusage = @tags.values.sort {|x,y| y.total_scenario_count <=> x.total_scenario_count }
32
+
33
+ create_full_list(@tagusage,"Tag Usage")
34
+ create_full_list(@features)
35
+ create_full_list(@scenarios)
36
+
37
+ @step_transformers = YARD::CodeObjects::StepTransformersObject.new(:root,"steptransformers")
38
+
39
+ @step_definitions.each {|stepdef| @step_transformers << stepdef }
40
+
41
+ serialize_object(@step_transformers)
42
+
43
+ end
44
+
45
+ def asset(path, content)
46
+ options[:serializer].serialize(path, content) if options[:serializer]
47
+ end
48
+
49
+ def serialize_object(object)
50
+ options[:object] = object
51
+ Templates::Engine.with_serializer(object.filename, options[:serializer]) do
52
+ T('layout').run(options)
53
+ end
54
+ end
55
+
56
+ def create_full_list(objects,friendly_name=nil)
57
+ @list_type = "#{objects.first.type.to_s}s"
58
+ @list_title = "#{friendly_name || objects.first.type.to_s.capitalize} List"
59
+ asset("#{objects.first.type}_list.html",erb(:full_list))
60
+ end
61
+
62
+ def find_unique_tags(tags)
63
+
64
+ tags_hash = {}
65
+
66
+ tags.each do |tag|
67
+ tags_hash[tag.value] = YARD::CodeObjects::Cucumber::TagUsage.new(:root,"tag_#{tag.value}"){|t| t.value = tag.value } unless tags_hash[tag.value]
68
+ tags_hash[tag.value.to_s] << tag
69
+ end
70
+
71
+ tags_hash
72
+ end
73
+
@@ -0,0 +1,14 @@
1
+ <meta name="Content-Type" content="text/html; charset=<%= charset %>" />
2
+ <title><%= @page_title %></title>
3
+ <link rel="stylesheet" href="<%= url_for("css/style.css") %>" type="text/css" media="screen" charset="utf-8" />
4
+ <link rel="stylesheet" href="<%= url_for("css/common.css") %>" type="text/css" media="screen" charset="utf-8" />
5
+ <% if @extra_css %>
6
+ <link rel="stylesheet" href="<%= url_for @extra_css %>" type="text/css" media="screen" charset="utf-8" />
7
+ <% end %>
8
+ <script type="text/javascript" charset="utf-8">
9
+ relpath = '<%= url_for('') %>';
10
+ if (relpath != '') relpath += '/';
11
+ </script>
12
+ <script type="text/javascript" charset="utf-8" src="<%= url_for("js/jquery.js") %>"></script>
13
+ <script type="text/javascript" charset="utf-8" src="<%= url_for("js/app.js") %>"></script>
14
+ <script type="text/javascript" charset="utf-8" src="<%= url_for("js/cucumber.js") %>"></script>
@@ -0,0 +1,8 @@
1
+ <div id="search">
2
+ <a id="feature_list_link" href="#">Features</a>
3
+ <a id="tagusage_list_link" href="#">Tags</a>
4
+ <a id="scenario_list_link" href="#">Scenarios</a>
5
+ <a id="class_list_link" href="#">Class List</a>
6
+ <a id="method_list_link" href="#">Method List</a>
7
+ <a id ="file_list_link" href="#">File List</a>
8
+ </div>
@@ -0,0 +1,23 @@
1
+ <% if object.step_transforms %>
2
+ <h2>Step Transforms</h2>
3
+ <dl class="constants">
4
+ <% object.step_transforms.each do |step| %>
5
+ <dt>
6
+ <span style="font-weight: normal;">Transform</span>
7
+ <span style="constants"><%= step.value %></span>
8
+ </dt>
9
+ <dd><pre class="code"><%= step.source %></pre></dd>
10
+ <% end %>
11
+ </dl>
12
+ <table class="source_code">
13
+ <tr>
14
+ <td>
15
+ <pre class="lines"><%= "\n\n\n" %><%= h format_lines(object) %></pre>
16
+ </td>
17
+ <td>
18
+ <pre class="code"><span class="info file"># File '<%= h object.file %>'<% if object.line %>, line <%= object.line %><% end %></span><%= "\n\n" %><%= html_syntax_highlight object.source %></pre>
19
+ </td>
20
+ </tr>
21
+ </table>
22
+
23
+ <% end %>
@@ -0,0 +1,5 @@
1
+ def init
2
+ super
3
+ sections.place(:step_transforms).after(:constant_summary)
4
+ end
5
+
@@ -0,0 +1,26 @@
1
+ <div class="scenario">
2
+ <div class="title">
3
+ <span class="pre">Scenario:</span>
4
+ <span class="name"><%= @scenario.value %></span>
5
+ </div>
6
+ <% unless @scenario.tags.empty? %>
7
+ <div class="tags"><%= @scenario.tags.collect { |tags| tags.value }.join("&nbsp;&nbsp;") %></div>
8
+ <% end %>
9
+ <% unless @scenario.description.empty? %>
10
+ <div class="description">
11
+ <%= @scenario.description.join("\n<br/>") %>
12
+ </div>
13
+ <% end %>
14
+ <div class="steps">
15
+ <% unless @scenario.steps.empty? %>
16
+ <% @scenario.steps.each do |step| %>
17
+ <!-- TODO: Style the first word differently -->
18
+ <!-- TODO: Link the step to the step definition -->
19
+ <!-- TODO: Steps without links should appear different -->
20
+ <div class="step"><span class="predicate"><%= step.keyword %></span>&nbsp;<%= step.line %></div>
21
+ <% end %>
22
+ <% else %>
23
+ <span>No Steps Defined</span>
24
+ <% end %>
25
+ </div>
26
+ </div>
@@ -0,0 +1,5 @@
1
+ def init
2
+ super
3
+ sections.push :scenario
4
+ @scenario = object
5
+ end
@@ -0,0 +1,38 @@
1
+ <div class="title">
2
+ <div class="name">Step Definitions</div>
3
+ </div>
4
+
5
+ <div style="margin: 10px;">&nbsp;</div>
6
+
7
+
8
+ <% @step_transformers.definitions.each_with_index do |stepdef,index| %>
9
+
10
+ <div class="stepdef">
11
+ <a name="<%= stepdef.name %>">
12
+ <div class="title">
13
+ <span class="pre"><%= stepdef.keyword %></span>
14
+ <span class="name"><%= stepdef.value %></span>
15
+ <div style="float: right;"><%= h( "#{stepdef.files.first.first}:#{stepdef.files.first.last}" ) %></div>
16
+ </div>
17
+
18
+
19
+ <div class="steps">
20
+ <% if stepdef.steps && !stepdef.steps.empty? %>
21
+ <% stepdef.steps.each_with_index do |step,step_index| %>
22
+ <div class="step <%= (step_index + 1) % 2 == 0 ? 'even' : 'odd' %>">
23
+ <%= h("#{step.keyword} #{step.value}") %>
24
+ <div class="details"><a href="<%= step.scenario.feature.filename %>"><%= h(step.location) %></a></div>
25
+ </div>
26
+ <% end %>
27
+ <% else %>
28
+ <span class="undefined">No steps were found to match this step definition.</span>
29
+ <% end%>
30
+ </div>
31
+
32
+
33
+ <div class="source">
34
+ <!-- <%= h(stepdef.source) %> -->
35
+ </div>
36
+ </div>
37
+
38
+ <% end %>
@@ -0,0 +1,5 @@
1
+ def init
2
+ super
3
+ sections.push :stepdefinition
4
+ @step_transformers = object
5
+ end
@@ -0,0 +1,65 @@
1
+ <div class="tag">
2
+ <div class="title">
3
+ <span class="pre">Tag:</span>
4
+ <span class="name"><%= @tags.value %></span>
5
+
6
+ </div>
7
+
8
+ <div class="meta">
9
+ <div class="file">Usage:
10
+ <%= @tags.feature_count > 0 ? "#{@tags.feature_count} feature#{@tags.feature_count > 1 ? 's' : ''} (with #{@tags.indirect_scenario_count} scenario#{@tags.indirect_scenario_count > 1 ? 's' : ''})" : "" %>
11
+ <%= " and " if @tags.feature_count > 0 && @tags.scenario_count > 0 %>
12
+ <%= @tags.scenario_count > 0 ? "#{@tags.scenario_count} scenario#{@tags.scenario_count > 1 ? 's' : ''}" : "" %>
13
+ </div>
14
+ </div>
15
+
16
+ <% if @tags.tags %>
17
+ <% @tags.tags.each do |tag| %>
18
+
19
+ <% if tag.scenario %>
20
+ <div class="feature indirect">
21
+ <div class="title">
22
+ <span class="pre">Feature:</span>
23
+ <span class="name">
24
+ <a href="<%= tag.scenario.feature.filename %>"><%= tag.scenario.feature.value %></a>
25
+ </span>
26
+ </div>
27
+ <div class="description"><%= tag.scenario.feature.description %></div>
28
+ </div>
29
+
30
+ <div class="scenario direct">
31
+ <div class="title">
32
+ <span class="pre">Scenario:</span>
33
+ <span class="name">
34
+ <a href="<%= tag.scenario.feature.filename %>"><%= tag.scenario.value %></a>
35
+ </span>
36
+ </div>
37
+ <div class="description"><%= tag.scenario.description %></div>
38
+ </div>
39
+ <% else %>
40
+ <div class="feature direct">
41
+ <div class="title">
42
+ <span class="pre">Feature:</span>
43
+ <span class="name">
44
+ <a href="<%= tag.feature.filename %>"><%= tag.feature.value %></a>
45
+ </span>
46
+ </div>
47
+ <div class="description"><%= tag.feature.description %></div>
48
+ </div>
49
+
50
+ <% tag.feature.scenarios.each do |scenario| %>
51
+ <div class="scenario indirect">
52
+ <div class="title">
53
+ <span class="pre">Scenario:</span>
54
+ <span class="name">
55
+ <a href="<%= scenario.feature.filename %>"><%= scenario.value %></a>
56
+ </span>
57
+ </div>
58
+ <div class="description"><%= scenario.description %></div>
59
+ </div>
60
+ <% end %>
61
+ <% end %>
62
+
63
+ <% end %>
64
+ <% end%>
65
+ </div>
@@ -0,0 +1,5 @@
1
+ def init
2
+ super
3
+ sections.push :tagusage
4
+ @tags = object
5
+ end