cucumberator 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +3 -2
- data/README.md +2 -2
- data/features/scenario_outline.feature +33 -0
- data/lib/cucumberator/current_step.rb +14 -2
- data/lib/cucumberator/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bada171a0b353be632b8f44826e26036b5df6da
|
4
|
+
data.tar.gz: d38c51ba4b2cbaa67ffbdf832da70ddd3b8214c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c06b94018e982ab635f0fce37e968f3b37f11559bb2a37296c44e2c0f82e279744ccfdb7f92a70d6178c32794ff75546c0cfd7f56c0294ae82de686ba5a0e93e
|
7
|
+
data.tar.gz: 150db94cb769bbe710e5e2898d429d0b67d6597bd719c68d97d5a6f9fe689b3afbcc6a4775761d1013efdea92e96d210dca195bbeb6785fa36c420946c796879
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -58,7 +58,7 @@ or put @cucumberize before **last** scenario you want to fill up, for example
|
|
58
58
|
|
59
59
|
and then run this feature file, watch your console for prompt to show up. Enjoy writing steps on the go!
|
60
60
|
|
61
|
-
##
|
61
|
+
## Compatibility
|
62
62
|
|
63
63
|
Latest cucumberator version supports:
|
64
64
|
|
@@ -67,7 +67,7 @@ Latest cucumberator version supports:
|
|
67
67
|
* JRuby >= 1.7.4 (1.9 mode)
|
68
68
|
* Rubinius >= 2.0.0.w38 (1.9 mode)
|
69
69
|
|
70
|
-
Check for
|
70
|
+
Check for compatibility details on [Travis](https://travis-ci.org/vidmantas/cucumberator)
|
71
71
|
|
72
72
|
## Want to contribute?
|
73
73
|
|
@@ -0,0 +1,33 @@
|
|
1
|
+
Feature: Scenario outline
|
2
|
+
Background:
|
3
|
+
Given a file named "examples/support/env.rb" with:
|
4
|
+
"""
|
5
|
+
require 'cucumberator'
|
6
|
+
"""
|
7
|
+
Given a file named "examples/step_definitions/extra.rb" with:
|
8
|
+
"""
|
9
|
+
When(/I do some magical stuff with '(\w+)'/) do |*args|
|
10
|
+
# just example
|
11
|
+
end
|
12
|
+
|
13
|
+
"""
|
14
|
+
|
15
|
+
Scenario: without cucumberator step
|
16
|
+
Given a file named "examples/scenario_outline.feature" with:
|
17
|
+
"""
|
18
|
+
Feature: example
|
19
|
+
Scenario Outline: run and exit
|
20
|
+
When I do some magical stuff with '<fruit>'
|
21
|
+
|
22
|
+
Examples:
|
23
|
+
| fruit |
|
24
|
+
| bananas |
|
25
|
+
|
26
|
+
"""
|
27
|
+
|
28
|
+
When I run `cucumber examples/scenario_outline.feature` interactively
|
29
|
+
Then it should pass with:
|
30
|
+
"""
|
31
|
+
1 scenario (1 passed)
|
32
|
+
1 step (1 passed)
|
33
|
+
"""
|
@@ -4,12 +4,24 @@ module Cucumberator
|
|
4
4
|
class CurrentStep
|
5
5
|
attr_accessor :line
|
6
6
|
|
7
|
-
def initialize(
|
8
|
-
@
|
7
|
+
def initialize(environment)
|
8
|
+
@environment = environment
|
9
|
+
@scenario_sexp = steps.to_sexp
|
9
10
|
@offset = 0
|
10
11
|
set_line
|
11
12
|
end
|
12
13
|
|
14
|
+
def check_for_scenario_outline!
|
15
|
+
return unless @environment.respond_to?(:scenario_outline)
|
16
|
+
|
17
|
+
@environment = @environment.scenario_outline
|
18
|
+
end
|
19
|
+
|
20
|
+
def steps
|
21
|
+
check_for_scenario_outline!
|
22
|
+
@environment.instance_variable_get(:@steps)
|
23
|
+
end
|
24
|
+
|
13
25
|
def increase
|
14
26
|
@offset += 1
|
15
27
|
set_line
|
data/lib/cucumberator/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumberator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vidmantas Kabošis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|
@@ -73,6 +73,7 @@ files:
|
|
73
73
|
- features/last_step.feature
|
74
74
|
- features/next.feature
|
75
75
|
- features/save.feature
|
76
|
+
- features/scenario_outline.feature
|
76
77
|
- features/simple_hook.feature
|
77
78
|
- features/steps.feature
|
78
79
|
- features/support/env.rb
|
@@ -120,8 +121,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
121
|
version: '0'
|
121
122
|
requirements: []
|
122
123
|
rubyforge_project:
|
123
|
-
rubygems_version: 2.
|
124
|
+
rubygems_version: 2.4.3
|
124
125
|
signing_key:
|
125
126
|
specification_version: 4
|
126
|
-
summary: cucumberator-1.0.
|
127
|
+
summary: cucumberator-1.0.2
|
127
128
|
test_files: []
|
129
|
+
has_rdoc:
|