aslakhellesoy-cucumber 0.2.0 → 0.2.0.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,8 @@
1
+ == 0.2.1 (In Git)
2
+
3
+ == Bugfixes
4
+ * Snippets are showing 'Ands' (#249 Aslak Hellesøy)
5
+
1
6
  == 0.2.0 2009-03-18
2
7
 
3
8
  This release sports a bunch of new and exciting features, as well a major rewrite of Cucumber's internals.
data/Manifest.txt CHANGED
@@ -177,9 +177,11 @@ examples/tickets/features/177/3.feature
177
177
  examples/tickets/features/180.feature
178
178
  examples/tickets/features/236.feature
179
179
  examples/tickets/features/241.feature
180
+ examples/tickets/features/248.feature
180
181
  examples/tickets/features/lib/eatting_machine.rb
181
182
  examples/tickets/features/lib/pantry.rb
182
183
  examples/tickets/features/scenario_outline.feature
184
+ examples/tickets/features/step_definitons/248_steps.rb
183
185
  examples/tickets/features/step_definitons/scenario_outline_steps.rb
184
186
  examples/tickets/features/step_definitons/tickets_steps.rb
185
187
  examples/tickets/features/tickets.feature
@@ -78,21 +78,6 @@ module Cucumber
78
78
  @file_colon_line ||= @feature_element.file_colon_line(@line) unless @feature_element.nil?
79
79
  end
80
80
 
81
- def actual_keyword
82
- if [Cucumber.keyword_hash['and'], Cucumber.keyword_hash['but']].index(@keyword) && previous_step
83
- previous_step.actual_keyword
84
- else
85
- @keyword
86
- end
87
- end
88
-
89
- protected
90
-
91
- # TODO: Remove when we use StepCollection everywhere
92
- def previous_step
93
- @feature_element.previous_step(self)
94
- end
95
-
96
81
  private
97
82
 
98
83
  def matched_cells(cells)
@@ -79,7 +79,7 @@ module Cucumber
79
79
  end
80
80
 
81
81
  def actual_keyword
82
- if [Cucumber.keyword_hash['and'], Cucumber.keyword_hash['but']].index(@keyword) && previous
82
+ if [Cucumber.keyword_hash['and'], Cucumber.keyword_hash['but']].index(@step.keyword) && previous
83
83
  previous.actual_keyword
84
84
  else
85
85
  @step.keyword
@@ -64,7 +64,7 @@ module Cucumber
64
64
  # Formats the matched arguments of the associated Step. This method
65
65
  # is usually called from visitors, which render output.
66
66
  #
67
- # The +format+ either be a String or a Proc.
67
+ # The +format+ can either be a String or a Proc.
68
68
  #
69
69
  # If it is a String it should be a format string according to
70
70
  # <tt>Kernel#sprinf</tt>, for example:
@@ -3,7 +3,7 @@ module Cucumber #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
5
  TINY = 0
6
- PATCH = nil # Set to nil for official release
6
+ PATCH = 1 # Set to nil for official release
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
9
9
  end
@@ -3,6 +3,14 @@ require File.dirname(__FILE__) + '/../../spec_helper'
3
3
  module Cucumber
4
4
  module Ast
5
5
  describe StepCollection do
6
+ it "should convert And to Given in snippets" do
7
+ c = StepCollection.new([
8
+ Step.new(1, 'Given', 'cukes'),
9
+ Step.new(2, 'And', 'turnips')
10
+ ])
11
+ actual_keywords = c.step_invocations.map{|i| i.actual_keyword}
12
+ actual_keywords.should == %w{Given Given}
13
+ end
6
14
  end
7
15
  end
8
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aslakhellesoy-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Aslak Helles\xC3\xB8y"
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-18 00:00:00 -07:00
12
+ date: 2009-03-20 00:00:00 -07:00
13
13
  default_executable: cucumber
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency