cucumber 0.7.0.beta.7 → 0.7.0.beta.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ == 0.7.0.beta.8 (2010-04-29)
2
+
3
+ === Bugfixes
4
+ * Inconsistent order of execution Background and Before in 0.7.0.beta.2 (#600 Mike Sassak)
5
+ * Make sure both lexing and parsing errors are captured and reported with line number (Gregory Hnatiuk)
6
+
1
7
  == 0.7.0.beta.7 (2010-04-28)
2
8
 
3
9
  === Bugfixes
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :patch: 0
3
- :build: beta.7
3
+ :build: beta.8
4
4
  :major: 0
5
5
  :minor: 7
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cucumber}
8
- s.version = "0.7.0.beta.7"
8
+ s.version = "0.7.0.beta.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Aslak Helles\303\270y"]
12
- s.date = %q{2010-04-28}
12
+ s.date = %q{2010-04-29}
13
13
  s.default_executable = %q{cucumber}
14
14
  s.description = %q{Behaviour Driven Development with elegance and joy}
15
15
  s.email = %q{cukes@googlegroups.com}
@@ -347,6 +347,7 @@ Gem::Specification.new do |s|
347
347
  "features/bug_464.feature",
348
348
  "features/bug_475.feature",
349
349
  "features/bug_585_tab_indentation.feature",
350
+ "features/bug_600.feature",
350
351
  "features/call_steps_from_stepdefs.feature",
351
352
  "features/cucumber_cli.feature",
352
353
  "features/cucumber_cli_diff_disabled.feature",
@@ -540,7 +541,7 @@ Gem::Specification.new do |s|
540
541
 
541
542
  (::) U P G R A D I N G (::)
542
543
 
543
- Thank you for installing cucumber-0.7.0.beta.7.
544
+ Thank you for installing cucumber-0.7.0.beta.8.
544
545
  Please be sure to read http://wiki.github.com/aslakhellesoy/cucumber/upgrading
545
546
  for important information about this release. Happy cuking!
546
547
 
@@ -0,0 +1,67 @@
1
+ Feature: http://rspec.lighthouseapp.com/projects/16211/tickets/600-inconsistent-order-of-execution-background-and-before-in-070beta2
2
+
3
+ Scenario: Background executed twice when scenario follows scenario outline
4
+ Given a standard Cucumber project directory structure
5
+ And a file named "features/t.feature" with:
6
+ """
7
+ Feature: test
8
+ Background:
9
+ Given I am in the background
10
+
11
+ Scenario Outline: test 1
12
+ Given I am a step
13
+
14
+ Examples:
15
+ | a |
16
+ | 1 |
17
+
18
+ Scenario: test 2
19
+ """
20
+ And a file named "features/step_definitions/t_steps.rb" with:
21
+ """
22
+ Given "I am in the background" do
23
+ puts "Within background"
24
+ end
25
+
26
+ Given "I am a step" do
27
+ # no-op
28
+ end
29
+ """
30
+ And a file named "features/support/env.rb" with:
31
+ """
32
+ module TestWorld
33
+ def before_scenario
34
+ puts "Before scenario"
35
+ end
36
+
37
+ def after_scenario
38
+ puts "After scenario"
39
+ end
40
+ end
41
+
42
+ World(TestWorld)
43
+
44
+ Before do
45
+ before_scenario
46
+ end
47
+
48
+ After do
49
+ after_scenario
50
+ end
51
+ """
52
+ When I run cucumber -f progress features/t.feature
53
+ Then it should pass with
54
+ """
55
+ Before scenario
56
+ Within background
57
+ .--After scenario
58
+ Before scenario
59
+ Within background
60
+ .After scenario
61
+
62
+
63
+ 2 scenarios (2 passed)
64
+ 3 steps (3 passed)
65
+
66
+ """
67
+
@@ -38,7 +38,7 @@ module Cucumber
38
38
  ast.language = lexer.i18n_language
39
39
  ast.file = @path
40
40
  ast
41
- rescue Gherkin::LexingError => e
41
+ rescue Gherkin::LexingError, Gherkin::Parser::ParseError => e
42
42
  e.message.insert(0, "#{@path}: ")
43
43
  raise e
44
44
  end
@@ -74,7 +74,10 @@ module Cucumber
74
74
  example_sections=[]
75
75
  )
76
76
  @feature.add_feature_element(scenario_outline)
77
- @background.feature_elements << scenario_outline if @background
77
+ if @background
78
+ @background = @background.dup
79
+ @background.feature_elements << scenario_outline
80
+ end
78
81
  @step_container = scenario_outline
79
82
  end
80
83
 
@@ -139,4 +142,4 @@ module Cucumber
139
142
  end
140
143
  end
141
144
  end
142
- end
145
+ end
metadata CHANGED
@@ -7,8 +7,8 @@ version: !ruby/object:Gem::Version
7
7
  - 7
8
8
  - 0
9
9
  - beta
10
- - 7
11
- version: 0.7.0.beta.7
10
+ - 8
11
+ version: 0.7.0.beta.8
12
12
  platform: ruby
13
13
  authors:
14
14
  - "Aslak Helles\xC3\xB8y"
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-04-28 00:00:00 -05:00
19
+ date: 2010-04-29 00:00:00 -05:00
20
20
  default_executable: cucumber
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -525,6 +525,7 @@ files:
525
525
  - features/bug_464.feature
526
526
  - features/bug_475.feature
527
527
  - features/bug_585_tab_indentation.feature
528
+ - features/bug_600.feature
528
529
  - features/call_steps_from_stepdefs.feature
529
530
  - features/cucumber_cli.feature
530
531
  - features/cucumber_cli_diff_disabled.feature
@@ -721,7 +722,7 @@ post_install_message: |+
721
722
 
722
723
  (::) U P G R A D I N G (::)
723
724
 
724
- Thank you for installing cucumber-0.7.0.beta.7.
725
+ Thank you for installing cucumber-0.7.0.beta.8.
725
726
  Please be sure to read http://wiki.github.com/aslakhellesoy/cucumber/upgrading
726
727
  for important information about this release. Happy cuking!
727
728