cucumber-in-the-yard 1.5 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,13 @@
1
+ === 1.5.1 / 2010-10-26
2
+
3
+ * Unified Feature/Scenario search field that resembles the Namespace-Class field
4
+ * Tag search also displays immediate features/scenarios
5
+ * Removed Scenario searching field
6
+ * Added filename and line number to a number of locations
7
+ * Minor Tag template enhancements
8
+ * FIX - Scenario Outline Reference was being replaced with the first example
9
+ * FIX - Scenario Outlines were not getting counted for tags
10
+
1
11
  === 1.5 / 2010-10-25
2
12
 
3
13
  * Steps that have found their step definitions will also attempt to find their
data/Manifest CHANGED
@@ -1,63 +1,61 @@
1
- History.txt
2
- Manifest
3
- README.md
4
- Rakefile
5
- example/empty.feature
6
- example/example.feature
7
- example/example.third.feature
8
- example/second_example.feature
9
- example/step_definitions/example.step.rb
10
- example/step_definitions/support/env.rb
11
- example/step_definitions/support/env_support.rb
12
- example/step_definitions/support/support.rb
13
- lib/city.rb
14
- lib/cucumber/city_builder.rb
15
- lib/templates/default/feature/html/background.erb
16
- lib/templates/default/feature/html/feature.erb
17
- lib/templates/default/feature/html/no_steps_defined.erb
18
- lib/templates/default/feature/html/outline.erb
19
- lib/templates/default/feature/html/pystring.erb
20
- lib/templates/default/feature/html/scenario.erb
21
- lib/templates/default/feature/html/steps.erb
22
- lib/templates/default/feature/html/table.erb
23
- lib/templates/default/feature/setup.rb
24
- lib/templates/default/fulldoc/html/css/common.css
25
- lib/templates/default/fulldoc/html/full_list.erb
26
- lib/templates/default/fulldoc/html/full_list_features.erb
27
- lib/templates/default/fulldoc/html/full_list_requirements.erb
28
- lib/templates/default/fulldoc/html/full_list_scenarios.erb
29
- lib/templates/default/fulldoc/html/full_list_stepdefinitions.erb
30
- lib/templates/default/fulldoc/html/full_list_steps.erb
31
- lib/templates/default/fulldoc/html/full_list_tags.erb
32
- lib/templates/default/fulldoc/html/index.erb
33
- lib/templates/default/fulldoc/html/js/cucumber.js
34
- lib/templates/default/fulldoc/html/setup.rb
35
- lib/templates/default/layout/html/headers.erb
36
- lib/templates/default/layout/html/search.erb
37
- lib/templates/default/scenario/html/scenario.erb
38
- lib/templates/default/scenario/setup.rb
39
- lib/templates/default/steptransformers/html/steptransformers.erb
40
- lib/templates/default/steptransformers/html/transformers.erb
41
- lib/templates/default/steptransformers/setup.rb
42
- lib/templates/default/tag/html/feature.erb
43
- lib/templates/default/tag/html/scenario.erb
44
- lib/templates/default/tag/html/tag.erb
45
- lib/templates/default/tag/setup.rb
46
- lib/yard/code_objects/cucumber/base.rb
47
- lib/yard/code_objects/cucumber/feature.rb
48
- lib/yard/code_objects/cucumber/namespace_object.rb
49
- lib/yard/code_objects/cucumber/scenario.rb
50
- lib/yard/code_objects/cucumber/scenario_outline.rb
51
- lib/yard/code_objects/cucumber/step.rb
52
- lib/yard/code_objects/cucumber/tag.rb
53
- lib/yard/code_objects/namespace_object.rb
54
- lib/yard/code_objects/step_definition.rb
55
- lib/yard/code_objects/step_transform.rb
56
- lib/yard/handlers/cucumber/base.rb
57
- lib/yard/handlers/cucumber/feature_handler.rb
58
- lib/yard/handlers/step_definition_handler.rb
59
- lib/yard/handlers/step_transform_handler.rb
60
- lib/yard/parser/cucumber/feature.rb
61
- lib/yard/parser/source_parser.rb
62
- lib/yard/rake/city_task.rb
63
- lib/yard/templates/helpers/base_helper.rb
1
+ History.txt
2
+ Manifest
3
+ README.md
4
+ Rakefile
5
+ example/empty.feature
6
+ example/example.feature
7
+ example/example.third.feature
8
+ example/second_example.feature
9
+ example/step_definitions/example.step.rb
10
+ example/step_definitions/support/env.rb
11
+ example/step_definitions/support/env_support.rb
12
+ example/step_definitions/support/support.rb
13
+ lib/city.rb
14
+ lib/cucumber/city_builder.rb
15
+ lib/templates/default/feature/html/background.erb
16
+ lib/templates/default/feature/html/feature.erb
17
+ lib/templates/default/feature/html/no_steps_defined.erb
18
+ lib/templates/default/feature/html/outline.erb
19
+ lib/templates/default/feature/html/pystring.erb
20
+ lib/templates/default/feature/html/scenario.erb
21
+ lib/templates/default/feature/html/steps.erb
22
+ lib/templates/default/feature/html/table.erb
23
+ lib/templates/default/feature/setup.rb
24
+ lib/templates/default/fulldoc/html/css/common.css
25
+ lib/templates/default/fulldoc/html/full_list.erb
26
+ lib/templates/default/fulldoc/html/full_list_features.erb
27
+ lib/templates/default/fulldoc/html/full_list_stepdefinitions.erb
28
+ lib/templates/default/fulldoc/html/full_list_steps.erb
29
+ lib/templates/default/fulldoc/html/full_list_tags.erb
30
+ lib/templates/default/fulldoc/html/index.erb
31
+ lib/templates/default/fulldoc/html/js/cucumber.js
32
+ lib/templates/default/fulldoc/html/setup.rb
33
+ lib/templates/default/layout/html/headers.erb
34
+ lib/templates/default/layout/html/search.erb
35
+ lib/templates/default/scenario/html/scenario.erb
36
+ lib/templates/default/scenario/setup.rb
37
+ lib/templates/default/steptransformers/html/steptransformers.erb
38
+ lib/templates/default/steptransformers/html/transformers.erb
39
+ lib/templates/default/steptransformers/setup.rb
40
+ lib/templates/default/tag/html/feature.erb
41
+ lib/templates/default/tag/html/scenario.erb
42
+ lib/templates/default/tag/html/tag.erb
43
+ lib/templates/default/tag/setup.rb
44
+ lib/yard/code_objects/cucumber/base.rb
45
+ lib/yard/code_objects/cucumber/feature.rb
46
+ lib/yard/code_objects/cucumber/namespace_object.rb
47
+ lib/yard/code_objects/cucumber/scenario.rb
48
+ lib/yard/code_objects/cucumber/scenario_outline.rb
49
+ lib/yard/code_objects/cucumber/step.rb
50
+ lib/yard/code_objects/cucumber/tag.rb
51
+ lib/yard/code_objects/namespace_object.rb
52
+ lib/yard/code_objects/step_definition.rb
53
+ lib/yard/code_objects/step_transform.rb
54
+ lib/yard/handlers/cucumber/base.rb
55
+ lib/yard/handlers/cucumber/feature_handler.rb
56
+ lib/yard/handlers/step_definition_handler.rb
57
+ lib/yard/handlers/step_transform_handler.rb
58
+ lib/yard/parser/cucumber/feature.rb
59
+ lib/yard/parser/source_parser.rb
60
+ lib/yard/rake/city_task.rb
61
+ lib/yard/templates/helpers/base_helper.rb
data/README.md CHANGED
@@ -127,10 +127,11 @@ Roadmap
127
127
 
128
128
  **Future Feature Ideas**
129
129
 
130
- **1. Users are able to search Features, Scenarios, and Tags in a unified search box.**
130
+ **1. Represent instances of scenarios for scenario outlines.**
131
131
 
132
- I want to rid the three added search fields and provide one unified search field that will use YARD's
133
- namespace structure (similar to how Class List works).
132
+ Display all the values that would normally be substituted into a scenario for the scenario outline. To
133
+ make it easier to represent them to product owners. As well as link the instance of the step definitions
134
+ for developers.
134
135
 
135
136
  **2. Tag pages provide the ability to exclude other tags that intersect.**
136
137
 
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ task :gendoc do
8
8
  `yardoc -e lib/city.rb -p lib/templates 'example/**/*' --debug`
9
9
  end
10
10
 
11
- Echoe.new('cucumber-in-the-yard', '1.5') do |g|
11
+ Echoe.new('cucumber-in-the-yard', '1.5.1') do |g|
12
12
  g.author = "Franklin Webber"
13
13
  g.email = "franklin.webber@gmail.com"
14
14
  g.url = "http://github.com/burtlo/Cucumber-In-The-Yard"
@@ -17,6 +17,6 @@ Echoe.new('cucumber-in-the-yard', '1.5') do |g|
17
17
  Step Definitions, Transforms, and Tags and provides a documentation interface that allows you
18
18
  easily view and investigate the test suite. This tools hopes to bridge the gap of being able
19
19
  to provide your feature descriptions to your Product Owners and Stakeholders. }
20
- g.ignore_pattern = FileList["{doc,autotest}/**/*"].to_a
20
+ g.ignore_pattern = FileList["{doc,pkg,spec,features,nbproject,autotest}/**/*"].to_a
21
21
  g.runtime_dependencies = [ "cucumber >=0.7.5", "yard >=0.6.1" ]
22
22
  end
@@ -2,19 +2,19 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{cucumber-in-the-yard}
5
- s.version = "1.5"
5
+ s.version = "1.5.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Franklin Webber"]
9
- s.date = %q{2010-10-25}
9
+ s.date = %q{2010-10-26}
10
10
  s.description = %q{
11
11
  Cucumber-In-The-Yard is a YARD extension that processes Cucumber Features, Scenarios, Steps,
12
12
  Step Definitions, Transforms, and Tags and provides a documentation interface that allows you
13
13
  easily view and investigate the test suite. This tools hopes to bridge the gap of being able
14
14
  to provide your feature descriptions to your Product Owners and Stakeholders. }
15
15
  s.email = %q{franklin.webber@gmail.com}
16
- s.extra_rdoc_files = ["README.md", "lib/city.rb", "lib/cucumber/city_builder.rb", "lib/templates/default/feature/html/background.erb", "lib/templates/default/feature/html/feature.erb", "lib/templates/default/feature/html/no_steps_defined.erb", "lib/templates/default/feature/html/outline.erb", "lib/templates/default/feature/html/pystring.erb", "lib/templates/default/feature/html/scenario.erb", "lib/templates/default/feature/html/steps.erb", "lib/templates/default/feature/html/table.erb", "lib/templates/default/feature/setup.rb", "lib/templates/default/fulldoc/html/css/common.css", "lib/templates/default/fulldoc/html/full_list.erb", "lib/templates/default/fulldoc/html/full_list_features.erb", "lib/templates/default/fulldoc/html/full_list_requirements.erb", "lib/templates/default/fulldoc/html/full_list_scenarios.erb", "lib/templates/default/fulldoc/html/full_list_stepdefinitions.erb", "lib/templates/default/fulldoc/html/full_list_steps.erb", "lib/templates/default/fulldoc/html/full_list_tags.erb", "lib/templates/default/fulldoc/html/index.erb", "lib/templates/default/fulldoc/html/js/cucumber.js", "lib/templates/default/fulldoc/html/setup.rb", "lib/templates/default/layout/html/headers.erb", "lib/templates/default/layout/html/search.erb", "lib/templates/default/scenario/html/scenario.erb", "lib/templates/default/scenario/setup.rb", "lib/templates/default/steptransformers/html/steptransformers.erb", "lib/templates/default/steptransformers/html/transformers.erb", "lib/templates/default/steptransformers/setup.rb", "lib/templates/default/tag/html/feature.erb", "lib/templates/default/tag/html/scenario.erb", "lib/templates/default/tag/html/tag.erb", "lib/templates/default/tag/setup.rb", "lib/yard/code_objects/cucumber/base.rb", "lib/yard/code_objects/cucumber/feature.rb", "lib/yard/code_objects/cucumber/namespace_object.rb", "lib/yard/code_objects/cucumber/scenario.rb", "lib/yard/code_objects/cucumber/scenario_outline.rb", "lib/yard/code_objects/cucumber/step.rb", "lib/yard/code_objects/cucumber/tag.rb", "lib/yard/code_objects/namespace_object.rb", "lib/yard/code_objects/step_definition.rb", "lib/yard/code_objects/step_transform.rb", "lib/yard/handlers/cucumber/base.rb", "lib/yard/handlers/cucumber/feature_handler.rb", "lib/yard/handlers/step_definition_handler.rb", "lib/yard/handlers/step_transform_handler.rb", "lib/yard/parser/cucumber/feature.rb", "lib/yard/parser/source_parser.rb", "lib/yard/rake/city_task.rb", "lib/yard/templates/helpers/base_helper.rb"]
17
- s.files = ["History.txt", "Manifest", "README.md", "Rakefile", "example/empty.feature", "example/example.feature", "example/example.third.feature", "example/second_example.feature", "example/step_definitions/example.step.rb", "example/step_definitions/support/env.rb", "example/step_definitions/support/env_support.rb", "example/step_definitions/support/support.rb", "lib/city.rb", "lib/cucumber/city_builder.rb", "lib/templates/default/feature/html/background.erb", "lib/templates/default/feature/html/feature.erb", "lib/templates/default/feature/html/no_steps_defined.erb", "lib/templates/default/feature/html/outline.erb", "lib/templates/default/feature/html/pystring.erb", "lib/templates/default/feature/html/scenario.erb", "lib/templates/default/feature/html/steps.erb", "lib/templates/default/feature/html/table.erb", "lib/templates/default/feature/setup.rb", "lib/templates/default/fulldoc/html/css/common.css", "lib/templates/default/fulldoc/html/full_list.erb", "lib/templates/default/fulldoc/html/full_list_features.erb", "lib/templates/default/fulldoc/html/full_list_requirements.erb", "lib/templates/default/fulldoc/html/full_list_scenarios.erb", "lib/templates/default/fulldoc/html/full_list_stepdefinitions.erb", "lib/templates/default/fulldoc/html/full_list_steps.erb", "lib/templates/default/fulldoc/html/full_list_tags.erb", "lib/templates/default/fulldoc/html/index.erb", "lib/templates/default/fulldoc/html/js/cucumber.js", "lib/templates/default/fulldoc/html/setup.rb", "lib/templates/default/layout/html/headers.erb", "lib/templates/default/layout/html/search.erb", "lib/templates/default/scenario/html/scenario.erb", "lib/templates/default/scenario/setup.rb", "lib/templates/default/steptransformers/html/steptransformers.erb", "lib/templates/default/steptransformers/html/transformers.erb", "lib/templates/default/steptransformers/setup.rb", "lib/templates/default/tag/html/feature.erb", "lib/templates/default/tag/html/scenario.erb", "lib/templates/default/tag/html/tag.erb", "lib/templates/default/tag/setup.rb", "lib/yard/code_objects/cucumber/base.rb", "lib/yard/code_objects/cucumber/feature.rb", "lib/yard/code_objects/cucumber/namespace_object.rb", "lib/yard/code_objects/cucumber/scenario.rb", "lib/yard/code_objects/cucumber/scenario_outline.rb", "lib/yard/code_objects/cucumber/step.rb", "lib/yard/code_objects/cucumber/tag.rb", "lib/yard/code_objects/namespace_object.rb", "lib/yard/code_objects/step_definition.rb", "lib/yard/code_objects/step_transform.rb", "lib/yard/handlers/cucumber/base.rb", "lib/yard/handlers/cucumber/feature_handler.rb", "lib/yard/handlers/step_definition_handler.rb", "lib/yard/handlers/step_transform_handler.rb", "lib/yard/parser/cucumber/feature.rb", "lib/yard/parser/source_parser.rb", "lib/yard/rake/city_task.rb", "lib/yard/templates/helpers/base_helper.rb", "cucumber-in-the-yard.gemspec"]
16
+ s.extra_rdoc_files = ["README.md", "lib/city.rb", "lib/cucumber/city_builder.rb", "lib/templates/default/feature/html/background.erb", "lib/templates/default/feature/html/feature.erb", "lib/templates/default/feature/html/no_steps_defined.erb", "lib/templates/default/feature/html/outline.erb", "lib/templates/default/feature/html/pystring.erb", "lib/templates/default/feature/html/scenario.erb", "lib/templates/default/feature/html/steps.erb", "lib/templates/default/feature/html/table.erb", "lib/templates/default/feature/setup.rb", "lib/templates/default/fulldoc/html/css/common.css", "lib/templates/default/fulldoc/html/full_list.erb", "lib/templates/default/fulldoc/html/full_list_features.erb", "lib/templates/default/fulldoc/html/full_list_stepdefinitions.erb", "lib/templates/default/fulldoc/html/full_list_steps.erb", "lib/templates/default/fulldoc/html/full_list_tags.erb", "lib/templates/default/fulldoc/html/index.erb", "lib/templates/default/fulldoc/html/js/cucumber.js", "lib/templates/default/fulldoc/html/setup.rb", "lib/templates/default/layout/html/headers.erb", "lib/templates/default/layout/html/search.erb", "lib/templates/default/scenario/html/scenario.erb", "lib/templates/default/scenario/setup.rb", "lib/templates/default/steptransformers/html/steptransformers.erb", "lib/templates/default/steptransformers/html/transformers.erb", "lib/templates/default/steptransformers/setup.rb", "lib/templates/default/tag/html/feature.erb", "lib/templates/default/tag/html/scenario.erb", "lib/templates/default/tag/html/tag.erb", "lib/templates/default/tag/setup.rb", "lib/yard/code_objects/cucumber/base.rb", "lib/yard/code_objects/cucumber/feature.rb", "lib/yard/code_objects/cucumber/namespace_object.rb", "lib/yard/code_objects/cucumber/scenario.rb", "lib/yard/code_objects/cucumber/scenario_outline.rb", "lib/yard/code_objects/cucumber/step.rb", "lib/yard/code_objects/cucumber/tag.rb", "lib/yard/code_objects/namespace_object.rb", "lib/yard/code_objects/step_definition.rb", "lib/yard/code_objects/step_transform.rb", "lib/yard/handlers/cucumber/base.rb", "lib/yard/handlers/cucumber/feature_handler.rb", "lib/yard/handlers/step_definition_handler.rb", "lib/yard/handlers/step_transform_handler.rb", "lib/yard/parser/cucumber/feature.rb", "lib/yard/parser/source_parser.rb", "lib/yard/rake/city_task.rb", "lib/yard/templates/helpers/base_helper.rb"]
17
+ s.files = ["History.txt", "Manifest", "README.md", "Rakefile", "example/empty.feature", "example/example.feature", "example/example.third.feature", "example/second_example.feature", "example/step_definitions/example.step.rb", "example/step_definitions/support/env.rb", "example/step_definitions/support/env_support.rb", "example/step_definitions/support/support.rb", "lib/city.rb", "lib/cucumber/city_builder.rb", "lib/templates/default/feature/html/background.erb", "lib/templates/default/feature/html/feature.erb", "lib/templates/default/feature/html/no_steps_defined.erb", "lib/templates/default/feature/html/outline.erb", "lib/templates/default/feature/html/pystring.erb", "lib/templates/default/feature/html/scenario.erb", "lib/templates/default/feature/html/steps.erb", "lib/templates/default/feature/html/table.erb", "lib/templates/default/feature/setup.rb", "lib/templates/default/fulldoc/html/css/common.css", "lib/templates/default/fulldoc/html/full_list.erb", "lib/templates/default/fulldoc/html/full_list_features.erb", "lib/templates/default/fulldoc/html/full_list_stepdefinitions.erb", "lib/templates/default/fulldoc/html/full_list_steps.erb", "lib/templates/default/fulldoc/html/full_list_tags.erb", "lib/templates/default/fulldoc/html/index.erb", "lib/templates/default/fulldoc/html/js/cucumber.js", "lib/templates/default/fulldoc/html/setup.rb", "lib/templates/default/layout/html/headers.erb", "lib/templates/default/layout/html/search.erb", "lib/templates/default/scenario/html/scenario.erb", "lib/templates/default/scenario/setup.rb", "lib/templates/default/steptransformers/html/steptransformers.erb", "lib/templates/default/steptransformers/html/transformers.erb", "lib/templates/default/steptransformers/setup.rb", "lib/templates/default/tag/html/feature.erb", "lib/templates/default/tag/html/scenario.erb", "lib/templates/default/tag/html/tag.erb", "lib/templates/default/tag/setup.rb", "lib/yard/code_objects/cucumber/base.rb", "lib/yard/code_objects/cucumber/feature.rb", "lib/yard/code_objects/cucumber/namespace_object.rb", "lib/yard/code_objects/cucumber/scenario.rb", "lib/yard/code_objects/cucumber/scenario_outline.rb", "lib/yard/code_objects/cucumber/step.rb", "lib/yard/code_objects/cucumber/tag.rb", "lib/yard/code_objects/namespace_object.rb", "lib/yard/code_objects/step_definition.rb", "lib/yard/code_objects/step_transform.rb", "lib/yard/handlers/cucumber/base.rb", "lib/yard/handlers/cucumber/feature_handler.rb", "lib/yard/handlers/step_definition_handler.rb", "lib/yard/handlers/step_transform_handler.rb", "lib/yard/parser/cucumber/feature.rb", "lib/yard/parser/source_parser.rb", "lib/yard/rake/city_task.rb", "lib/yard/templates/helpers/base_helper.rb", "cucumber-in-the-yard.gemspec"]
18
18
  s.homepage = %q{http://github.com/burtlo/Cucumber-In-The-Yard}
19
19
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Cucumber-in-the-yard", "--main", "README.md"]
20
20
  s.require_paths = ["lib"]
@@ -17,6 +17,7 @@ Given /^that (#{CUSTOMER}) is a valid customer$/ do |customer|
17
17
  end
18
18
 
19
19
  When /^a customer logs in as username '([^']+)' with password '([^']+)'$/ do |username,password|
20
+ Given "that the customer is a valid customer"
20
21
  pending "Customer logs in with #{username} and #{password}"
21
22
  end
22
23
 
@@ -0,0 +1,7 @@
1
+
2
+ module Environment
3
+ module Database
4
+ class Connection
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,12 @@
1
+
2
+ class SupportClass
3
+
4
+ end
5
+
6
+ module Web
7
+ module Interface
8
+ class CachedReference
9
+
10
+ end
11
+ end
12
+ end
@@ -21,7 +21,7 @@ module Cucumber
21
21
  end
22
22
 
23
23
  def find_or_create_tag(tag_name,parent)
24
- log.debug "Processing tag #{tag_name}"
24
+ #log.debug "Processing tag #{tag_name}"
25
25
  tag_code_object = YARD::Registry.all(:tag).find {|tag| tag.value == tag_name } ||
26
26
  YARD::CodeObjects::Cucumber::Tag.new(YARD::CodeObjects::Cucumber::CUCUMBER_TAG_NAMESPACE,tag_name.gsub('@','')) {|t| t.owners = [] ; t.value = tag_name }
27
27
 
@@ -32,7 +32,7 @@ module Cucumber
32
32
  end
33
33
 
34
34
  def feature(feature)
35
- log.debug "FEATURE: #{feature.name} #{feature.line} #{feature.keyword} #{feature.description}"
35
+ #log.debug "FEATURE: #{feature.name} #{feature.line} #{feature.keyword} #{feature.description}"
36
36
  @feature = YARD::CodeObjects::Cucumber::Feature.new(@namespace,File.basename(@file.gsub('.feature','').gsub('.','_'))) do |f|
37
37
  f.comments = feature.comments.map{|comment| comment.value}.join("\n")
38
38
  f.description = feature.description
@@ -61,7 +61,7 @@ module Cucumber
61
61
  end
62
62
 
63
63
  def scenario(statement)
64
- log.debug "SCENARIO"
64
+ #log.debug "SCENARIO"
65
65
  scenario = YARD::CodeObjects::Cucumber::Scenario.new(@feature,"scenario_#{@feature.scenarios.length + 1}") do |s|
66
66
  s.comments = statement.comments.map{|comment| comment.value}.join("\n")
67
67
  s.description = statement.description
@@ -109,19 +109,19 @@ module Cucumber
109
109
  @step_container.example_data.length.times do |row_index|
110
110
 
111
111
  scenario = YARD::CodeObjects::Cucumber::Scenario.new(@step_container,"example_#{@step_container.scenarios.length + 1}") do |s|
112
- s.comments = @comments
113
- s.description = @description
112
+ s.comments = @step_container.comments
113
+ s.description = @step_container.description
114
114
  s.add_file(@file,@step_container.line_number)
115
- s.keyword = @keyword
116
- s.value = "#{@value} (#{@step_container.scenarios.length + 1})"
115
+ s.keyword = @step_container.keyword
116
+ s.value = "#{@step_container.value} (#{@step_container.scenarios.length + 1})"
117
117
 
118
118
  #TODO: Should scenario instances have their own tag instances?
119
119
  end
120
120
 
121
121
  @step_container.steps.each do |step|
122
122
  step_instance = YARD::CodeObjects::Cucumber::Step.new(scenario,step.line_number) do |s|
123
- s.keyword = step.keyword
124
- s.value = step.value
123
+ s.keyword = step.keyword.dup
124
+ s.value = step.value.dup
125
125
  s.add_file(@file,step.line_number)
126
126
  end
127
127
 
@@ -18,7 +18,7 @@ $(function() {
18
18
  <span class="name"><%= h @scenario.value %></span>
19
19
  </div>
20
20
  <div class="meta">
21
- <div class="file">Line: <%= @scenario.line_number %></div>
21
+ <div class="file"><%= @scenario.location %></div>
22
22
  <% unless @scenario.tags.empty? %>
23
23
  <div class="tags">
24
24
  <% @scenario.tags.each do |tag| %>
@@ -1,53 +1,19 @@
1
+ .feature {}
2
+ .tags { font-family: monospace; font-size: 14px; }
3
+ * .title { padding: 10px; font-size: 24px; }
1
4
 
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
- }
5
+ .feature > .title, .tag > .title { margin: 20px 20px 10px 20px; padding-left: 0px; border-bottom: 1px solid #E3E3E3; }
6
+ .meta .file { float: right; margin-right: 20px; }
7
+ * .title .pre { color: #696969; }
8
+ * .title .name { font-weight: bold; color: #3F3F3F; }
36
9
 
37
- .meta {
38
- margin-left: 30px;
39
- color: gray;
40
- }
41
- .scenario .meta .tags {
42
- margin-left: 0px;
43
- }
10
+ .meta { margin-left: 30px; color: gray; }
11
+ .scenario .meta .tags { margin-left: 0px; }
44
12
 
45
13
  .feature .description {
46
14
  margin: 10px 20px 0px 30px;
47
15
  padding: 10px 20px 20px 10px;
48
- /* background-color: #F5F5F5;*/
49
16
  color: #343332;
50
- /* border: #C7C5C5 solid 1px;*/
51
17
  font-family: 'Trebuchet MS', Arial, Helvetica;
52
18
  }
53
19
 
@@ -146,15 +112,14 @@
146
112
 
147
113
 
148
114
  /* Overrides for scenarios in the tag view */
149
- .tag .scenario {
150
- margin-left: 30px;
151
- margin-top: 0px;
152
- }
153
- .tag .scenario .title {
154
- border-bottom: none;
155
- }
115
+
116
+ .tag .feature { margin-left: 20px; }
117
+ .tag .scenario { margin-top: 0px; margin-left: 20px; padding-left: 30px; }
118
+ .tag .scenario .title { border-bottom: none; }
119
+ .tag .scenario .meta { margin-top: 0px; }
156
120
  /* Overrides for scenarios in the tag view */
157
121
 
122
+
158
123
  .stepdef .title {
159
124
  font-size: 14px;
160
125
  margin-top: 30px;
@@ -166,4 +131,5 @@
166
131
  }
167
132
  .stepdef .steps .step {
168
133
  padding: 4px;
169
- }
134
+ }
135
+
@@ -25,7 +25,7 @@
25
25
  </div>
26
26
  <div id="search">Search: <input type="text" /></div>
27
27
 
28
- <ul id="full_list" class="<%= @list_type %>">
28
+ <ul id="full_list" class="<%= @list_class || @list_type %>">
29
29
  <%= erb "full_list_#{@list_type}" %>
30
30
  </ul>
31
31
  </div>
@@ -1,7 +1,18 @@
1
- <% n = 1 %>
2
1
  <% @items.each do |feature| %>
3
- <li class="r<%= n %>">
2
+ <li>
3
+ <%= "<a class='toggle'></a>" unless feature.scenarios.empty? %>
4
4
  <%= linkify feature, feature.value %>
5
- </li>
6
- <% n = n == 2 ? 1 : 2 %>
5
+ <small><%= feature.location %></small>
6
+ </li>
7
+
8
+ <% if feature.scenarios %>
9
+ <ul>
10
+ <% feature.scenarios.each do |scenario| %>
11
+ <li>
12
+ <%= linkify feature, scenario.value %>
13
+ <small><%= scenario.location %></small>
14
+ </li>
15
+ <% end %>
16
+ </ul>
17
+ <% end %>
7
18
  <% end %>
@@ -2,7 +2,7 @@
2
2
  <% @items.each do |step| %>
3
3
  <li class="r<%= n %>">
4
4
  <span class='object_link'>
5
- <a href="<%= "#{step.scenario.feature.name}.html" %>">
5
+ <a href="<%= url_for step.scenario.feature %>">
6
6
  <span class="pre"><%= step.keyword %></span>
7
7
  <span class="name"><%= h(step.value) %></span>
8
8
  </a>
@@ -1,8 +1,23 @@
1
1
  <% n = 1 %>
2
2
  <% @items.each do |tag| %>
3
3
  <li class="r<%= n %>">
4
+ <a class='toggle'></a>
4
5
  <%= linkify tag, tag.value %>
5
6
  <small><%= tag.all_scenarios.size %></small>
6
7
  </li>
8
+ <ul>
9
+ <% tag.features.each do |feature| %>
10
+ <li>
11
+ <%= linkify feature, feature.value %>
12
+ <small><%= feature.location %></small>
13
+ </li>
14
+ <% end %>
15
+ <% tag.scenarios.each do |scenario| %>
16
+ <li>
17
+ <%= linkify scenario.feature, scenario.value %>
18
+ <small><%= scenario.location %></small>
19
+ </li>
20
+ <% end %>
21
+ </ul>
7
22
  <% n = n == 2 ? 1 : 2 %>
8
23
  <% end %>
@@ -5,9 +5,6 @@ function cucumberSearchFrameLinks() {
5
5
  $('#tagusage_list_link').click(function() {
6
6
  toggleSearchFrame(this, relpath + 'tag_list.html');
7
7
  });
8
- $('#scenario_list_link').click(function() {
9
- toggleSearchFrame(this, relpath + 'scenario_list.html');
10
- });
11
8
  }
12
9
 
13
10
  $(cucumberSearchFrameLinks);
@@ -20,8 +20,8 @@ def init
20
20
  generate_full_list @tags.sort {|x,y| y.all_scenarios.size <=> x.all_scenarios.size }
21
21
  end
22
22
 
23
- @scenarios = Registry.all(:scenario).find_all {|scenario| !scenario.background? }
24
- generate_full_list(@scenarios) if @scenarios
23
+ #@scenarios = Registry.all(:scenario).find_all {|scenario| !scenario.background? }
24
+ #generate_full_list(@scenarios) if @scenarios
25
25
 
26
26
  @steps = Registry.all(:step)
27
27
  generate_full_list(@steps) if @steps
@@ -39,6 +39,7 @@ def generate_full_list(objects,friendly_name=nil)
39
39
  @items = objects
40
40
  @list_type = "#{objects.first.type.to_s}s"
41
41
  @list_title = "#{friendly_name || objects.first.type.to_s.capitalize} List"
42
+ @list_class = "class"
42
43
  asset("#{objects.first.type}_list.html",erb(:full_list))
43
44
  else
44
45
  log.warn "Full List: Failed to create a list because the objects array is empty."
@@ -1,7 +1,6 @@
1
1
  <div id="search">
2
2
  <a id="feature_list_link" href="#">Features</a>
3
3
  <a id="tagusage_list_link" href="#">Tags</a>
4
- <a id="scenario_list_link" href="#">Scenarios</a>
5
4
  <a id="class_list_link" href="#">Class List</a>
6
5
  <a id="method_list_link" href="#">Method List</a>
7
6
  <a id ="file_list_link" href="#">File List</a>
@@ -1,23 +1,48 @@
1
1
  <% object.features.each do |feature| %>
2
2
  <div class="feature direct">
3
3
  <div class="title">
4
- <span class="pre">Feature:</span>
4
+ <span class="pre"><%= feature.keyword %></span>
5
5
  <span class="name">
6
6
  <a href="<%= url_for feature %>"><%= feature.value %></a>
7
7
  </span>
8
8
  </div>
9
- <div class="description"><%= feature.description %></div>
10
-
11
- <% feature.scenarios.each do |scenario| %>
12
- <div class="scenario indirect">
13
- <div class="title">
14
- <span class="pre">Scenario:</span>
15
- <span class="name">
16
- <a href="<%= url_for feature %>"><%= scenario.value %></a>
17
- </span>
9
+ <div class="meta">
10
+ <div class="file"><%= h(feature.file) %></div>
11
+ <div class="tags">Tags:
12
+ <% feature.tags.each do |tag| %>
13
+ <a href="<%= url_for tag %>"><%= tag.value %></a>
14
+ <% end %>
15
+ </div>
16
+ </div>
17
+ <div class="description">
18
+ <%= feature.description %>
19
+ </div>
20
+ </div>
21
+ <% feature.scenarios.each do |scenario| %>
22
+ <div class="scenario indirect">
23
+ <div class="title">
24
+ <span class="pre"><%= scenario.keyword %></span>
25
+ <span class="name">
26
+ <a href="<%= url_for feature %>"><%= scenario.value %></a>
27
+ </span>
28
+ </div>
29
+ <div class="meta">
30
+ <div class="file">
31
+ <%= scenario.location %>
18
32
  </div>
19
- <div class="description"><%= scenario.description %></div>
33
+ <% unless scenario.tags.empty? %>
34
+ <div class="tags">
35
+ Tags: <% scenario.tags.each do |tag| %>
36
+ <a href="<%= url_for tag %>"><%= tag.value %></a>
37
+ <% end %>
38
+ </div>
39
+ <% end%>
40
+ </div>
41
+ <% unless scenario.description.empty? %>
42
+ <div class="description">
43
+ <%= h scenario.description %>
20
44
  </div>
21
- <% end %>
22
-
45
+ <% end %>
46
+ </div>
47
+ <% end %>
23
48
  <% end %>
@@ -1,21 +1,43 @@
1
1
  <% object.scenarios.each do |scenario| %>
2
2
  <div class="feature indirect">
3
3
  <div class="title">
4
- <span class="pre">Feature:</span>
4
+ <span class="pre"><%= scenario.feature.keyword %></span>
5
5
  <span class="name">
6
6
  <a href="<%= url_for scenario.feature %>"><%= scenario.feature.value %></a>
7
7
  </span>
8
8
  </div>
9
+ <div class="meta">
10
+ <div class="file"><%= h(scenario.feature.file) %></div>
11
+ <div class="tags">Tags:
12
+ <% scenario.feature.tags.each do |tag| %>
13
+ <a href="<%= url_for tag %>"><%= tag.value %></a>
14
+ <% end %>
15
+ </div>
16
+ </div>
9
17
  <div class="description"><%= scenario.feature.description %></div>
10
18
  </div>
11
19
 
12
20
  <div class="scenario direct">
13
21
  <div class="title">
14
- <span class="pre">Scenario:</span>
22
+ <span class="pre"><%= scenario.keyword %></span>
15
23
  <span class="name">
16
24
  <a href="<%= url_for scenario.feature %>"><%= scenario.value %></a>
17
25
  </span>
18
26
  </div>
19
- <div class="description"><%= scenario.description %></div>
27
+ <div class="meta">
28
+ <div class="file"><%= scenario.location %></div>
29
+ <% unless scenario.tags.empty? %>
30
+ <div class="tags">Tags:
31
+ <% scenario.tags.each do |tag| %>
32
+ <a href="<%= url_for tag %>"><%= tag.value %></a>
33
+ <% end %>
34
+ </div>
35
+ <% end%>
36
+ </div>
37
+ <% unless scenario.description.empty? %>
38
+ <div class="description">
39
+ <%= h scenario.description %>
40
+ </div>
41
+ <% end %>
20
42
  </div>
21
43
  <% end %>
@@ -12,7 +12,7 @@ module YARD::CodeObjects::Cucumber
12
12
  @examples = {}
13
13
  @transforms = []
14
14
  end
15
-
15
+
16
16
  def has_table?
17
17
  !@table.nil?
18
18
  end
@@ -11,7 +11,7 @@ module YARD::CodeObjects::Cucumber
11
11
  end
12
12
 
13
13
  def scenarios
14
- @owners.find_all{|owner| owner.is_a?(Scenario) }
14
+ @owners.find_all{|owner| owner.is_a?(Scenario) || owner.is_a?(ScenarioOutline) }
15
15
  end
16
16
 
17
17
  def indirect_scenarios
@@ -1,6 +1,7 @@
1
1
 
2
2
 
3
3
  class StepDefinitionHandler < YARD::Handlers::Ruby::Legacy::Base
4
+ #TODO: This needs to become language independent.
4
5
  MATCH = /^((When|Given|And|Then)\s*(\/[^\/]+\/).+)$/
5
6
  handles MATCH
6
7
 
@@ -17,13 +18,17 @@ class StepDefinitionHandler < YARD::Handlers::Ruby::Legacy::Base
17
18
  o.value = step_definition
18
19
  o.keyword = keyword
19
20
  end
21
+
22
+ find_steps_defined_in_block(statement.block)
20
23
 
21
24
  begin
22
25
  # Look for all constants within the step definitions
23
26
  stepdef_instance.constants = stepdef_instance._value_constants.each do |stepdef_constant|
24
27
  owner.constants.each do |constant|
25
28
  if stepdef_constant.to_sym == constant.name
26
- #log.debug "Replacing #{constant.name} with its value in the step definition #{stepdef_instance.value}"
29
+ log.debug "Constant #{constant.name} was found in the step definition #{stepdef_instance.value}, attempting to replace that value"
30
+ returned_constant = unpack_constants(constant.value)
31
+ log.debug "Post procedure on CONSTANT looks like #{returned_constant}"
27
32
  stepdef_instance.constants[constant.name] = unpack_constants(constant.value)
28
33
  end
29
34
  end
@@ -54,4 +59,24 @@ class StepDefinitionHandler < YARD::Handlers::Ruby::Legacy::Base
54
59
  constant_value
55
60
  end
56
61
 
62
+ #
63
+ # Step Definitions can contain defined steps within them. While it is likely that they could not
64
+ # very easily be parsed because of variables that are only calculated at runtime, it would be nice
65
+ # to at least list those in use within a step definition and if you can find a match, go ahead and
66
+ # make it
67
+ #
68
+ def find_steps_defined_in_block(block)
69
+ #log.debug "#{block} #{block.class}"
70
+ block.each_with_index do |token,index|
71
+ #log.debug "Token #{token.class} #{token.text}"
72
+ if token.is_a?(YARD::Parser::Ruby::Legacy::RubyToken::TkCONSTANT) &&
73
+ token.text =~ /^(given|when|then|and)$/i &&
74
+ block[index + 2].is_a?(YARD::Parser::Ruby::Legacy::RubyToken::TkSTRING)
75
+ log.debug "Step found in Step Definition: #{block[index + 2].text} "
76
+ end
77
+
78
+ end
79
+
80
+ end
81
+
57
82
  end
metadata CHANGED
@@ -5,7 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 5
8
- version: "1.5"
8
+ - 1
9
+ version: 1.5.1
9
10
  platform: ruby
10
11
  authors:
11
12
  - Franklin Webber
@@ -13,7 +14,7 @@ autorequire:
13
14
  bindir: bin
14
15
  cert_chain: []
15
16
 
16
- date: 2010-10-25 00:00:00 -07:00
17
+ date: 2010-10-26 00:00:00 -07:00
17
18
  default_executable:
18
19
  dependencies:
19
20
  - !ruby/object:Gem::Dependency
@@ -66,8 +67,6 @@ extra_rdoc_files:
66
67
  - lib/templates/default/fulldoc/html/css/common.css
67
68
  - lib/templates/default/fulldoc/html/full_list.erb
68
69
  - lib/templates/default/fulldoc/html/full_list_features.erb
69
- - lib/templates/default/fulldoc/html/full_list_requirements.erb
70
- - lib/templates/default/fulldoc/html/full_list_scenarios.erb
71
70
  - lib/templates/default/fulldoc/html/full_list_stepdefinitions.erb
72
71
  - lib/templates/default/fulldoc/html/full_list_steps.erb
73
72
  - lib/templates/default/fulldoc/html/full_list_tags.erb
@@ -130,8 +129,6 @@ files:
130
129
  - lib/templates/default/fulldoc/html/css/common.css
131
130
  - lib/templates/default/fulldoc/html/full_list.erb
132
131
  - lib/templates/default/fulldoc/html/full_list_features.erb
133
- - lib/templates/default/fulldoc/html/full_list_requirements.erb
134
- - lib/templates/default/fulldoc/html/full_list_scenarios.erb
135
132
  - lib/templates/default/fulldoc/html/full_list_stepdefinitions.erb
136
133
  - lib/templates/default/fulldoc/html/full_list_steps.erb
137
134
  - lib/templates/default/fulldoc/html/full_list_tags.erb
@@ -1 +0,0 @@
1
- <%= class_list %>
@@ -1,8 +0,0 @@
1
- <% n = 1 %>
2
- <% @items.each do |scenario| %>
3
- <li class="r<%= n %>">
4
- <%= linkify scenario.feature, scenario.value %>
5
- <small><%= h(scenario.location) %></small>
6
- </li>
7
- <% n = n == 2 ? 1 : 2 %>
8
- <% end %>