Skip to content

Commit

Permalink
Fixed [cucumber#182 state:resolved] and release 0.1.99.17 (I goofed 0…
Browse files Browse the repository at this point in the history
….1.99.16)
  • Loading branch information
aslakhellesoy committed Jan 30, 2009
1 parent 24d399c commit e028934
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 5 deletions.
1 change: 1 addition & 0 deletions Manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ examples/tickets/Rakefile
examples/tickets/cucumber.yml
examples/tickets/features/172.feature
examples/tickets/features/177-1.feature
examples/tickets/features/177-2.feature
examples/tickets/features/180.feature
examples/tickets/features/lib/eatting_machine.rb
examples/tickets/features/lib/pantry.rb
Expand Down
6 changes: 3 additions & 3 deletions cucumber.gemspec

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions examples/tickets/features/177-2.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Visitors may create an account, but for those who are not already in the
system an someone must activate the account for them before it can be used.

Feature: Activating an account
As a registered, but not yet activated, user
I want to be able to activate my account
So that I can log in to the site

Scenario: Not-yet-activated user can activate her account
Given a registered user named 'Reggie' # need to rewrite
# And the user has activation_code: 'activate_me', activated_at: nil!
# And we try hard to remember the user's updated_at, and created_at
# When she goes to /activate/activate_me
# Then she should be redirected to 'login'
# When she follows that redirect!
# Then she should see a notice message 'Signup complete!'
# And a user with login: 'reggie' should exist
# And the user should have login: 'reggie', and email: '[email protected]'
# And the user's activation_code should be nil
# And the user's activated_at should not be nil
# And she should not be logged in
13 changes: 13 additions & 0 deletions lib/cucumber/parser/feature.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
module Cucumber
module Parser
# TIP: When you hack on the grammar, just delete feature.rb in this directory.
# Also make sure you have uninstalled all cucumber gems (don't forget xxx-cucumber
# github gems).
#
# Treetop will then generate the parser in-memory. When you're happy, just generate
# the rb file with tt feature.tt
module Feature
Expand Down Expand Up @@ -49,6 +52,7 @@ def background
def feature_elements
elements[7]
end

end

module Feature2
Expand Down Expand Up @@ -150,6 +154,15 @@ def _nt_feature
if r14
r16 = _nt_feature_elements
s0 << r16
if r16
r18 = _nt_comment
if r18
r17 = r18
else
r17 = SyntaxNode.new(input, index...index)
end
s0 << r17
end
end
end
end
Expand Down
13 changes: 12 additions & 1 deletion lib/cucumber/parser/feature.tt
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
module Cucumber
module Parser
# TIP: When you hack on the grammar, just delete feature.rb in this directory.
# Also make sure you have uninstalled all cucumber gems (don't forget xxx-cucumber
# github gems).
#
# Treetop will then generate the parser in-memory. When you're happy, just generate
# the rb file with tt feature.tt
grammar Feature
include I18n
include Table

rule feature
white comment white tags white header:(!(scenario_outline / scenario / background) .)* background:(background)? feature_elements {
white
comment
white
tags
white
header:(!(scenario_outline / scenario / background) .)*
background:(background)?
feature_elements
comment? {
def build
if background.respond_to?(:build)
Ast::Feature.new(comment.build, tags.build, header.text_value, feature_elements.build, background.build)
Expand Down
6 changes: 6 additions & 0 deletions lib/cucumber/parser/table.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
module Cucumber
module Parser
# TIP: When you hack on the grammar, just delete feature.rb in this directory.
# Also make sure you have uninstalled all cucumber gems (don't forget xxx-cucumber
# github gems).
#
# Treetop will then generate the parser in-memory. When you're happy, just generate
# the rb file with tt feature.tt
module Table
include Treetop::Runtime

Expand Down
6 changes: 6 additions & 0 deletions lib/cucumber/parser/table.tt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
module Cucumber
module Parser
# TIP: When you hack on the grammar, just delete feature.rb in this directory.
# Also make sure you have uninstalled all cucumber gems (don't forget xxx-cucumber
# github gems).
#
# Treetop will then generate the parser in-memory. When you're happy, just generate
# the rb file with tt feature.tt
grammar Table

rule table
Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class VERSION #:nodoc:
MAJOR = 0
MINOR = 1
TINY = 99
PATCH = 15 # Set to nil for official release
PATCH = 17 # Set to nil for official release

STRING = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
end
Expand Down

0 comments on commit e028934

Please sign in to comment.