cucumber 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,56 +1,57 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cucumber (1.0.1)
4
+ cucumber (1.0.2)
5
5
  builder (>= 2.1.2)
6
6
  diff-lcs (>= 1.1.2)
7
- gherkin (~> 2.4.5)
7
+ gherkin (~> 2.4.18)
8
8
  json (>= 1.4.6)
9
- term-ansicolor (>= 1.0.5)
9
+ term-ansicolor (>= 1.0.6)
10
10
 
11
11
  GEM
12
12
  remote: http://rubygems.org/
13
13
  specs:
14
- aruba (0.4.3)
14
+ aruba (0.4.6)
15
15
  bcat (>= 0.6.1)
16
- childprocess (>= 0.1.9)
17
- cucumber (>= 0.10.7)
16
+ childprocess (>= 0.2.0)
17
+ cucumber (>= 1.0.2)
18
18
  rdiscount (>= 1.6.8)
19
19
  rspec (>= 2.6.0)
20
20
  bcat (0.6.1)
21
21
  rack (~> 1.0)
22
22
  builder (3.0.0)
23
- capybara (1.0.0)
23
+ capybara (1.1.0)
24
24
  mime-types (>= 1.16)
25
25
  nokogiri (>= 1.3.3)
26
26
  rack (>= 1.0.0)
27
27
  rack-test (>= 0.5.4)
28
- selenium-webdriver (~> 0.2.0)
28
+ selenium-webdriver (~> 2.0)
29
29
  xpath (~> 0.1.4)
30
- childprocess (0.1.9)
30
+ childprocess (0.2.2)
31
31
  ffi (~> 1.0.6)
32
- diff-lcs (1.1.2)
32
+ diff-lcs (1.1.3)
33
33
  ffi (1.0.9)
34
- gherkin (2.4.5)
34
+ gherkin (2.4.18)
35
35
  json (>= 1.4.6)
36
36
  innate (2011.04)
37
37
  rack (>= 1.1.0)
38
- json (1.5.3)
39
- json_pure (1.5.3)
38
+ json (1.5.4)
39
+ json_pure (1.5.4)
40
+ spruz (~> 0.2.8)
40
41
  mime-types (1.16)
41
42
  nokogiri (1.5.0)
42
43
  prawn (0.8.4)
43
- prawn-core (< 0.9, >= 0.8.4)
44
- prawn-layout (< 0.9, >= 0.8.4)
45
- prawn-security (< 0.9, >= 0.8.4)
44
+ prawn-core (>= 0.8.4, < 0.9)
45
+ prawn-layout (>= 0.8.4, < 0.9)
46
+ prawn-security (>= 0.8.4, < 0.9)
46
47
  prawn-core (0.8.4)
47
48
  prawn-layout (0.8.4)
48
49
  prawn-security (0.8.4)
49
- rack (1.3.0)
50
- rack-test (0.6.0)
50
+ rack (1.3.2)
51
+ rack-test (0.6.1)
51
52
  rack (>= 1.0)
52
53
  rake (0.9.2)
53
- ramaze (2011.01.30)
54
+ ramaze (2011.07.25)
54
55
  innate (>= 2010.03)
55
56
  rdiscount (1.6.8)
56
57
  rspec (2.6.0)
@@ -62,8 +63,8 @@ GEM
62
63
  diff-lcs (~> 1.1.2)
63
64
  rspec-mocks (2.6.0)
64
65
  rubyzip (0.9.4)
65
- selenium-webdriver (0.2.2)
66
- childprocess (>= 0.1.9)
66
+ selenium-webdriver (2.5.0)
67
+ childprocess (>= 0.2.1)
67
68
  ffi (>= 1.0.7)
68
69
  json_pure
69
70
  rubyzip
@@ -72,28 +73,29 @@ GEM
72
73
  simplecov-html (0.4.5)
73
74
  sinatra (1.2.6)
74
75
  rack (~> 1.1)
75
- tilt (< 2.0, >= 1.2.2)
76
+ tilt (>= 1.2.2, < 2.0)
76
77
  spork (0.9.0.rc9)
78
+ spruz (0.2.13)
77
79
  syntax (1.0.0)
78
- term-ansicolor (1.0.5)
79
- tilt (1.3.2)
80
+ term-ansicolor (1.0.6)
81
+ tilt (1.3.3)
80
82
  webrat (0.7.3)
81
83
  nokogiri (>= 1.2.0)
82
84
  rack (>= 1.0)
83
85
  rack-test (>= 0.5.3)
84
86
  xpath (0.1.4)
85
87
  nokogiri (~> 1.3)
86
- yard (0.7.1)
88
+ yard (0.7.2)
87
89
 
88
90
  PLATFORMS
89
91
  ruby
90
92
 
91
93
  DEPENDENCIES
92
- aruba (~> 0.4.2)
94
+ aruba (~> 0.4.6)
93
95
  bcat (= 0.6.1)
94
- capybara (>= 1.0.0)
96
+ capybara (>= 1.1.0)
95
97
  cucumber!
96
- nokogiri (>= 1.4.4)
98
+ nokogiri (>= 1.5.0)
97
99
  prawn (= 0.8.4)
98
100
  prawn-layout (= 0.8.4)
99
101
  rack-test (>= 0.5.7)
@@ -103,7 +105,7 @@ DEPENDENCIES
103
105
  rspec (>= 2.6.0)
104
106
  simplecov (>= 0.4.2)
105
107
  sinatra (>= 1.2.6)
106
- spork (>= 0.9.0.rc7)
108
+ spork (>= 0.9.0.rc9)
107
109
  syntax (>= 1.0.0)
108
110
  webrat (>= 0.7.3)
109
- yard (= 0.7.1)
111
+ yard (= 0.7.2)
data/History.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [v1.0.3](https://github.com/cucumber/cucumber/compare/v1.0.2...v1.0.3) (In Git)
2
+
3
+ ### Bugfixes
4
+ * Do not escape the replaced entity ([#126](https://github.com/cucumber/cucumber/pull/126) Jonathan Tron)
5
+
6
+ ### New Features
7
+ * DocStrings now have a content_type ([#132](https://github.com/cucumber/cucumber/issues/132) Matt Wynne)
8
+
1
9
  ## [v1.0.2](https://github.com/cucumber/cucumber/compare/v1.0.1...v1.0.2)
2
10
 
3
11
  ### Bugfixes
data/cucumber.gemspec CHANGED
@@ -23,24 +23,24 @@ for important information about this release. Happy cuking!
23
23
 
24
24
  }
25
25
 
26
- s.add_dependency 'gherkin', '~> 2.4.5'
27
- s.add_dependency 'term-ansicolor', '>= 1.0.5'
26
+ s.add_dependency 'gherkin', '~> 2.4.18'
27
+ s.add_dependency 'term-ansicolor', '>= 1.0.6'
28
28
  s.add_dependency 'builder', '>= 2.1.2'
29
29
  s.add_dependency 'diff-lcs', '>= 1.1.2'
30
30
  s.add_dependency 'json', '>= 1.4.6'
31
31
 
32
- s.add_development_dependency 'aruba', '~> 0.4.2'
32
+ s.add_development_dependency 'aruba', '~> 0.4.6'
33
33
  s.add_development_dependency 'rake', '>= 0.9.2'
34
34
  s.add_development_dependency 'rspec', '>= 2.6.0'
35
- s.add_development_dependency 'nokogiri', '>= 1.4.4'
35
+ s.add_development_dependency 'nokogiri', '>= 1.5.0'
36
36
  s.add_development_dependency 'prawn', '= 0.8.4'
37
37
  s.add_development_dependency 'prawn-layout', '= 0.8.4'
38
38
  s.add_development_dependency 'syntax', '>= 1.0.0'
39
- s.add_development_dependency 'spork', '>= 0.9.0.rc7'
39
+ s.add_development_dependency 'spork', '>= 0.9.0.rc9'
40
40
  s.add_development_dependency 'simplecov', '>= 0.4.2'
41
41
 
42
42
  # For Documentation:
43
- s.add_development_dependency('yard', '= 0.7.1')
43
+ s.add_development_dependency('yard', '= 0.7.2')
44
44
  s.add_development_dependency('rdiscount', '= 1.6.8')
45
45
  s.add_development_dependency('bcat', '= 0.6.1')
46
46
 
@@ -49,7 +49,7 @@ for important information about this release. Happy cuking!
49
49
  s.add_development_dependency 'rack-test', '>= 0.5.7'
50
50
  s.add_development_dependency 'webrat', '>= 0.7.3'
51
51
  s.add_development_dependency 'sinatra', '>= 1.2.6'
52
- s.add_development_dependency 'capybara', '>= 1.0.0'
52
+ s.add_development_dependency 'capybara', '>= 1.1.0'
53
53
 
54
54
  s.rubygems_version = ">= 1.6.1"
55
55
  s.files = `git ls-files`.split("\n")
@@ -0,0 +1,73 @@
1
+ Feature: Doc strings
2
+
3
+ If you need to specify information in a scenario that won't fit on a single line,
4
+ you can use a DocString.
5
+
6
+ A DocString follows a step, and starts and ends with three double quotes, like this:
7
+
8
+ ```gherkin
9
+ When I ask to reset my password
10
+ Then I should receive an email with:
11
+ """
12
+ Dear bozo,
13
+
14
+ Please click this link to reset your password
15
+ """
16
+ ```
17
+
18
+ It's possible to annotate the DocString with the type of content it contains. This is used by
19
+ formatting tools like http://relishapp.com which will render the contents of the DocString
20
+ appropriately. You specify the content type after the triple quote, like this:
21
+
22
+ ```gherkin
23
+ Given there is some Ruby code:
24
+ """ruby
25
+ puts "hello world"
26
+ """
27
+
28
+ You can read the content type from the argument passed into your step definition, as shown
29
+ in the example below.
30
+
31
+ Scenario: Plain text Docstring
32
+ Given a scenario with a step that looks like this:
33
+ """gherkin
34
+ Given I have a lot to say:
35
+ \"\"\"
36
+ One
37
+ Two
38
+ Three
39
+ \"\"\"
40
+ """
41
+ And a step definition that looks like this:
42
+ """ruby
43
+ Given /say/ do |text|
44
+ puts text
45
+ end
46
+ """
47
+ When I run the feature with the progress formatter
48
+ Then the output should contain:
49
+ """
50
+ One
51
+ Two
52
+ Three
53
+ """
54
+
55
+ Scenario: DocString with interesting content type
56
+ Given a scenario with a step that looks like this:
57
+ """gherkin
58
+ Given I have some code for you:
59
+ \"\"\"ruby
60
+ # hello
61
+ \"\"\"
62
+ """
63
+ And a step definition that looks like this:
64
+ """ruby
65
+ Given /code/ do |text|
66
+ puts text.content_type
67
+ end
68
+ """
69
+ When I run the feature with the progress formatter
70
+ Then the output should contain:
71
+ """
72
+ ruby
73
+ """
@@ -142,10 +142,10 @@ Feature: JSON output formatter
142
142
 
143
143
  """
144
144
 
145
- Scenario: pystring
146
- Given a file named "features/pystring.feature" with:
145
+ Scenario: DocString
146
+ Given a file named "features/doc_string.feature" with:
147
147
  """
148
- Feature: A pystring feature
148
+ Feature: A DocString feature
149
149
 
150
150
  Scenario:
151
151
  Then I should fail with
@@ -153,20 +153,20 @@ Feature: JSON output formatter
153
153
  a string
154
154
  \"\"\"
155
155
  """
156
- And a file named "features/step_definitions/pystring_steps.rb" with:
156
+ And a file named "features/step_definitions/doc_string_steps.rb" with:
157
157
  """
158
158
  Then /I should fail with/ do |s|
159
159
  raise s
160
160
  end
161
161
  """
162
- When I run cucumber "--format json features/pystring.feature"
162
+ When I run cucumber "--format json features/doc_string.feature"
163
163
  Then it should fail with JSON:
164
164
  """
165
165
  {
166
166
  "features": [
167
167
  {
168
168
  "keyword": "Feature",
169
- "name": "A pystring feature",
169
+ "name": "A DocString feature",
170
170
  "line": 1,
171
171
  "description": "",
172
172
  "elements": [
@@ -182,16 +182,17 @@ Feature: JSON output formatter
182
182
  "name": "I should fail with",
183
183
  "line": 4,
184
184
  "multiline_arg": {
185
+ "content_type": "",
185
186
  "value": "a string",
186
187
  "line": 5,
187
188
  "type": "doc_string"
188
189
  },
189
190
  "match": {
190
- "location": "features/step_definitions/pystring_steps.rb:1"
191
+ "location": "features/step_definitions/doc_string_steps.rb:1"
191
192
  },
192
193
  "result": {
193
194
  "status": "failed",
194
- "error_message": "a string (RuntimeError)\n./features/step_definitions/pystring_steps.rb:2:in `/I should fail with/'\nfeatures/pystring.feature:4:in `Then I should fail with'"
195
+ "error_message": "a string (RuntimeError)\n./features/step_definitions/doc_string_steps.rb:2:in `/I should fail with/'\nfeatures/doc_string.feature:4:in `Then I should fail with'"
195
196
  }
196
197
  }
197
198
  ]
@@ -245,4 +246,4 @@ Feature: JSON output formatter
245
246
  ]
246
247
  }
247
248
 
248
- """
249
+ """
@@ -7,8 +7,8 @@ module CucumberRubyMappings
7
7
  run_simple "#{cucumber_bin} features/a_feature.feature --name '#{scenario_name}'", false
8
8
  end
9
9
 
10
- def run_feature
11
- run_simple "#{cucumber_bin} features/a_feature.feature", false
10
+ def run_feature(filename = 'features/a_feature.feature', formatter = 'progress')
11
+ run_simple "#{cucumber_bin} #{filename} --format #{formatter}", false
12
12
  end
13
13
 
14
14
  def cucumber_bin
@@ -54,7 +54,7 @@ EOF
54
54
  end
55
55
 
56
56
  def write_calculator_code
57
- code = <<-EOF
57
+ code = <<-EOF
58
58
  # http://en.wikipedia.org/wiki/Reverse_Polish_notation
59
59
  class RpnCalculator
60
60
  def initialize
@@ -21,3 +21,18 @@ Given /^a directory without standard Cucumber project directory structure$/ do
21
21
  FileUtils.rm_rf 'features' if File.directory?('features')
22
22
  end
23
23
  end
24
+
25
+ Given /^a scenario with a step that looks like this:$/ do |string|
26
+ create_feature do
27
+ create_scenario { string }
28
+ end
29
+ end
30
+
31
+ Given /^a step definition that looks like this:$/ do |string|
32
+ create_step_definition { string }
33
+ end
34
+
35
+ When /^I run the feature with the (\w+) formatter$/ do |formatter|
36
+ features.length.should == 1
37
+ run_feature features.first, formatter
38
+ end
@@ -0,0 +1,50 @@
1
+ module FeatureFactory
2
+ def create_feature(name = generate_feature_name)
3
+ gherkin = <<-GHERKIN
4
+ Feature: #{name}
5
+ #{yield}
6
+ GHERKIN
7
+ write_file filename(name), gherkin
8
+ end
9
+
10
+ def create_scenario(name = generate_scenario_name)
11
+ <<-GHERKIN
12
+ Scenario: #{name}
13
+ #{yield}
14
+ GHERKIN
15
+ end
16
+
17
+ def create_step_definition
18
+ write_file generate_step_definition_filename, yield
19
+ end
20
+
21
+ def generate_feature_name
22
+ "Test Feature #{next_increment(:feature)}"
23
+ end
24
+
25
+ def generate_scenario_name
26
+ "Test Scenario #{next_increment(:scenario)}"
27
+ end
28
+
29
+ def next_increment(label)
30
+ @increments ||= {}
31
+ @increments[label] ||= 0
32
+ @increments[label] += 1
33
+ end
34
+
35
+ def generate_step_definition_filename
36
+ "features/step_definitions/test_steps#{next_increment(:step_defs)}.rb"
37
+ end
38
+
39
+ def filename(name)
40
+ "features/#{name.downcase.gsub(' ', '_')}.feature"
41
+ end
42
+
43
+ def features
44
+ in_current_dir do
45
+ Dir['features/*.feature']
46
+ end
47
+ end
48
+ end
49
+
50
+ World(FeatureFactory)
@@ -51,6 +51,7 @@ Feature: Language help
51
51
  | hr | Croatian | hrvatski |
52
52
  | hu | Hungarian | magyar |
53
53
  | id | Indonesian | Bahasa Indonesia |
54
+ | is | Icelandic | Íslenska |
54
55
  | it | Italian | italiano |
55
56
  | ja | Japanese | 日本語 |
56
57
  | ko | Korean | 한국어 |
@@ -16,59 +16,40 @@ module Cucumber
16
16
  #
17
17
  # Note how the indentation from the source is stripped away.
18
18
  #
19
- class DocString #:nodoc:
20
- class Builder
21
- attr_reader :string
22
-
23
- def initialize
24
- @string = ''
25
- end
26
-
27
- def doc_string(string, line_number)
28
- @string = string
29
- end
30
-
31
- def eof
32
- end
33
- end
34
-
19
+ class DocString < String #:nodoc:
35
20
  attr_accessor :file
36
21
 
37
22
  def self.default_arg_name
38
23
  "string"
39
24
  end
40
25
 
41
- def self.parse(text)
42
- builder = Builder.new
43
- lexer = Gherkin::I18nLexer.new(builder)
44
- lexer.scan(text)
45
- new(builder.string)
46
- end
26
+ attr_reader :content_type
47
27
 
48
- def initialize(string)
49
- @string = string
28
+ def initialize(string, content_type)
29
+ @content_type = content_type
30
+ super string
50
31
  end
51
32
 
52
33
  def to_step_definition_arg
53
- @string
34
+ self
54
35
  end
55
36
 
56
37
  def accept(visitor)
57
38
  return if Cucumber.wants_to_quit
58
- visitor.visit_doc_string(@string)
39
+ visitor.visit_doc_string(self)
59
40
  end
60
41
 
61
42
  def arguments_replaced(arguments) #:nodoc:
62
- string = @string
43
+ string = self
63
44
  arguments.each do |name, value|
64
45
  value ||= ''
65
46
  string = string.gsub(name, value)
66
47
  end
67
- DocString.new(string)
48
+ DocString.new(string, content_type)
68
49
  end
69
50
 
70
51
  def has_text?(text)
71
- @string.index(text)
52
+ index(text)
72
53
  end
73
54
 
74
55
  # For testing only
@@ -0,0 +1,30 @@
1
+ require 'gherkin/rubify'
2
+
3
+ module Cucumber
4
+ module Ast
5
+ module MultilineArgument
6
+
7
+ class << self
8
+ include Gherkin::Rubify
9
+
10
+ def from(argument)
11
+ return unless argument
12
+ return argument if argument.respond_to?(:to_step_definition_arg)
13
+
14
+ case(rubify(argument))
15
+ when String
16
+ # TODO: this duplicates work that gherkin does. We should really pass the string to gherkin and let it parse it.
17
+ Ast::DocString.new(argument, '')
18
+ when Gherkin::Formatter::Model::DocString
19
+ Ast::DocString.new(argument.value, argument.content_type)
20
+ when Array
21
+ Ast::Table.new(argument.map{|row| row.cells})
22
+ else
23
+ raise ArgumentError, "Don't know how to convert #{argument} into a MultilineArgument"
24
+ end
25
+ end
26
+
27
+ end
28
+ end
29
+ end
30
+ end
@@ -291,7 +291,7 @@ module Cucumber
291
291
  def doc_string(string)
292
292
  return if @hide_this_step
293
293
  @builder.pre(:class => 'val') do |pre|
294
- @builder << h(string.gsub("\n", '&#x000A;'))
294
+ @builder << h(string).gsub("\n", '&#x000A;')
295
295
  end
296
296
  end
297
297
 
@@ -1,5 +1,6 @@
1
1
  require 'cucumber/ast'
2
2
  require 'gherkin/rubify'
3
+ require 'cucumber/ast/multiline_argument'
3
4
 
4
5
  module Cucumber
5
6
  module Parser
@@ -92,17 +93,15 @@ module Cucumber
92
93
  @step_container.add_examples(examples_fields, examples)
93
94
  end
94
95
 
95
- def step(step)
96
- @table_owner = Ast::Step.new(step.line, step.keyword, step.name)
97
- @table_owner.gherkin_statement(step)
98
- multiline_arg = rubify(step.multiline_arg)
99
- case(multiline_arg)
100
- when Gherkin::Formatter::Model::DocString
101
- @table_owner.multiline_arg = Ast::DocString.new(multiline_arg.value)
102
- when Array
103
- @table_owner.multiline_arg = Ast::Table.new(matrix(multiline_arg))
104
- end
105
- @step_container.add_step(@table_owner)
96
+ def step(gherkin_step)
97
+ step = Ast::Step.new(
98
+ gherkin_step.line,
99
+ gherkin_step.keyword,
100
+ gherkin_step.name,
101
+ Ast::MultilineArgument.from(gherkin_step.multiline_arg)
102
+ )
103
+ step.gherkin_statement(gherkin_step)
104
+ @step_container.add_step(step)
106
105
  end
107
106
 
108
107
  def eof
@@ -4,7 +4,7 @@ require 'rbconfig'
4
4
 
5
5
  module Cucumber
6
6
  unless defined?(Cucumber::VERSION)
7
- VERSION = '1.0.2'
7
+ VERSION = '1.0.3'
8
8
  BINARY = File.expand_path(File.dirname(__FILE__) + '/../../bin/cucumber')
9
9
  LIBDIR = File.expand_path(File.dirname(__FILE__) + '/../../lib')
10
10
  JRUBY = defined?(JRUBY_VERSION)
@@ -1,7 +1,9 @@
1
1
  require 'cucumber/constantize'
2
+ require 'cucumber/ast/multiline_argument'
2
3
  require 'cucumber/runtime/for_programming_languages'
3
4
 
4
5
  module Cucumber
6
+
5
7
  class Runtime
6
8
 
7
9
  class SupportCode
@@ -18,15 +20,7 @@ module Cucumber
18
20
  end
19
21
 
20
22
  def step(step)
21
- cucumber_multiline_arg = case(rubify(step.multiline_arg))
22
- when Gherkin::Formatter::Model::DocString
23
- step.multiline_arg.value
24
- when Array
25
- Ast::Table.new(step.multiline_arg.map{|row| row.cells})
26
- else
27
- nil
28
- end
29
- @support_code.invoke(step.name, cucumber_multiline_arg)
23
+ @support_code.invoke(step.name, Ast::MultilineArgument.from(step.multiline_arg))
30
24
  end
31
25
 
32
26
  def eof
@@ -58,6 +52,17 @@ module Cucumber
58
52
  parser = Gherkin::Parser::Parser.new(StepInvoker.new(self), true, 'steps')
59
53
  parser.parse(steps_text, file, line.to_i)
60
54
  end
55
+
56
+ def invoke(step_name, multiline_argument=nil)
57
+ multiline_argument = Cucumber::Ast::MultilineArgument.from(multiline_argument)
58
+ # It is very important to leave multiline_argument=nil as a vararg. Cuke4Duke needs it that way.
59
+ begin
60
+ step_match(step_name).invoke(multiline_argument)
61
+ rescue Exception => e
62
+ e.nested! if Undefined === e
63
+ raise e
64
+ end
65
+ end
61
66
 
62
67
  # Loads and registers programming language implementation.
63
68
  # Instances are cached, so calling with the same argument
@@ -132,16 +137,6 @@ module Cucumber
132
137
  matches[0]
133
138
  end
134
139
 
135
- def invoke(step_name, multiline_argument=nil)
136
- # It is very important to leave multiline_argument=nil as a vararg. Cuke4Duke needs it that way.
137
- begin
138
- step_match(step_name).invoke(multiline_argument)
139
- rescue Exception => e
140
- e.nested! if Undefined === e
141
- raise e
142
- end
143
- end
144
-
145
140
  private
146
141
 
147
142
  def guess_step_matches?
@@ -20,7 +20,6 @@ module Cucumber
20
20
  end
21
21
 
22
22
  def invoke(multiline_arg)
23
- multiline_arg = Ast::DocString.new(multiline_arg) if String === multiline_arg
24
23
  all_args = args
25
24
  all_args << multiline_arg.to_step_definition_arg if multiline_arg
26
25
  @step_definition.invoke(all_args)
@@ -7,7 +7,7 @@ module Cucumber
7
7
  describe "replacing arguments" do
8
8
 
9
9
  before(:each) do
10
- @ps = DocString.new("<book>\n<qty>\n")
10
+ @ps = DocString.new("<book>\n<qty>\n", '')
11
11
  end
12
12
 
13
13
  it "should return a new doc_string with arguments replaced with values" do
@@ -23,7 +23,7 @@ module Cucumber
23
23
  end
24
24
 
25
25
  it "should replaced nil with empty string" do
26
- ps = DocString.new("'<book>'")
26
+ ps = DocString.new("'<book>'", '')
27
27
  doc_string_with_replaced_arg = ps.arguments_replaced({'<book>' => nil})
28
28
 
29
29
  doc_string_with_replaced_arg.to_step_definition_arg.should == "''"
@@ -24,7 +24,7 @@ module Cucumber
24
24
  %w{1 22 333},
25
25
  %w{4444 55555 666666}
26
26
  ])
27
- doc_string = Ast::DocString.new(%{\n I like\nCucumber sandwich\n})
27
+ doc_string = Ast::DocString.new(%{\n I like\nCucumber sandwich\n}, '')
28
28
 
29
29
  background = Ast::Background.new(Ast::Comment.new(""), 2, "Background:", "", "",
30
30
  [
@@ -48,7 +48,7 @@ module Cucumber
48
48
  end
49
49
 
50
50
  it "should replace arguments in py string arg" do
51
- doc_string = DocString.new('taste_<taste> color_<color>')
51
+ doc_string = DocString.new('taste_<taste> color_<color>', '')
52
52
 
53
53
  step = Step.new(1, 'Given', 'a <color> cucumber', doc_string)
54
54
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: cucumber
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.2
5
+ version: 1.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - "Aslak Helles\xC3\xB8y"
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-17 00:00:00 Z
13
+ date: 2011-09-07 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: gherkin
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ~>
22
22
  - !ruby/object:Gem::Version
23
- version: 2.4.5
23
+ version: 2.4.18
24
24
  type: :runtime
25
25
  version_requirements: *id001
26
26
  - !ruby/object:Gem::Dependency
@@ -31,7 +31,7 @@ dependencies:
31
31
  requirements:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: 1.0.5
34
+ version: 1.0.6
35
35
  type: :runtime
36
36
  version_requirements: *id002
37
37
  - !ruby/object:Gem::Dependency
@@ -75,7 +75,7 @@ dependencies:
75
75
  requirements:
76
76
  - - ~>
77
77
  - !ruby/object:Gem::Version
78
- version: 0.4.2
78
+ version: 0.4.6
79
79
  type: :development
80
80
  version_requirements: *id006
81
81
  - !ruby/object:Gem::Dependency
@@ -108,7 +108,7 @@ dependencies:
108
108
  requirements:
109
109
  - - ">="
110
110
  - !ruby/object:Gem::Version
111
- version: 1.4.4
111
+ version: 1.5.0
112
112
  type: :development
113
113
  version_requirements: *id009
114
114
  - !ruby/object:Gem::Dependency
@@ -152,7 +152,7 @@ dependencies:
152
152
  requirements:
153
153
  - - ">="
154
154
  - !ruby/object:Gem::Version
155
- version: 0.9.0.rc7
155
+ version: 0.9.0.rc9
156
156
  type: :development
157
157
  version_requirements: *id013
158
158
  - !ruby/object:Gem::Dependency
@@ -174,7 +174,7 @@ dependencies:
174
174
  requirements:
175
175
  - - "="
176
176
  - !ruby/object:Gem::Version
177
- version: 0.7.1
177
+ version: 0.7.2
178
178
  type: :development
179
179
  version_requirements: *id015
180
180
  - !ruby/object:Gem::Dependency
@@ -251,7 +251,7 @@ dependencies:
251
251
  requirements:
252
252
  - - ">="
253
253
  - !ruby/object:Gem::Version
254
- version: 1.0.0
254
+ version: 1.1.0
255
255
  type: :development
256
256
  version_requirements: *id022
257
257
  description: Behaviour Driven Development with elegance and joy
@@ -269,7 +269,6 @@ files:
269
269
  - .rspec
270
270
  - .rvmrc
271
271
  - .travis.yml
272
- - .yardopts
273
272
  - Gemfile
274
273
  - Gemfile.lock
275
274
  - History.md
@@ -529,6 +528,7 @@ files:
529
528
  - features/background.feature
530
529
  - features/bootstrap.feature
531
530
  - features/custom_formatter.feature
531
+ - features/doc_strings.feature
532
532
  - features/execute_with_tag_filter.feature
533
533
  - features/hooks.feature
534
534
  - features/iso-8859-1.feature
@@ -538,6 +538,7 @@ files:
538
538
  - features/step_definitions/cucumber_steps.rb
539
539
  - features/step_definitions/iso-8859-1_steps.rb
540
540
  - features/support/env.rb
541
+ - features/support/feature_factory.rb
541
542
  - features/tagged_hooks.feature
542
543
  - features/transforms.feature
543
544
  - fixtures/json/features/background.feature
@@ -695,6 +696,7 @@ files:
695
696
  - lib/cucumber/ast/feature.rb
696
697
  - lib/cucumber/ast/feature_element.rb
697
698
  - lib/cucumber/ast/features.rb
699
+ - lib/cucumber/ast/multiline_argument.rb
698
700
  - lib/cucumber/ast/names.rb
699
701
  - lib/cucumber/ast/outline_table.rb
700
702
  - lib/cucumber/ast/scenario.rb
@@ -831,7 +833,7 @@ licenses: []
831
833
 
832
834
  post_install_message: "\n\
833
835
  (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n\
834
- Thank you for installing cucumber-1.0.2.\n\
836
+ Thank you for installing cucumber-1.0.3.\n\
835
837
  Please be sure to read http://wiki.github.com/cucumber/cucumber/upgrading\n\
836
838
  for important information about this release. Happy cuking!\n\n\
837
839
  (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n"
@@ -854,14 +856,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
854
856
  requirements: []
855
857
 
856
858
  rubyforge_project:
857
- rubygems_version: 1.8.5
859
+ rubygems_version: 1.8.8
858
860
  signing_key:
859
861
  specification_version: 3
860
- summary: cucumber-1.0.2
862
+ summary: cucumber-1.0.3
861
863
  test_files:
862
864
  - features/background.feature
863
865
  - features/bootstrap.feature
864
866
  - features/custom_formatter.feature
867
+ - features/doc_strings.feature
865
868
  - features/execute_with_tag_filter.feature
866
869
  - features/hooks.feature
867
870
  - features/iso-8859-1.feature
@@ -871,6 +874,7 @@ test_files:
871
874
  - features/step_definitions/cucumber_steps.rb
872
875
  - features/step_definitions/iso-8859-1_steps.rb
873
876
  - features/support/env.rb
877
+ - features/support/feature_factory.rb
874
878
  - features/tagged_hooks.feature
875
879
  - features/transforms.feature
876
880
  - spec/cucumber/ast/background_spec.rb
data/.yardopts DELETED
File without changes