geordi 2.8.0 → 2.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d495c07776a3b37bbc4a8a631fefc1faef059e39622bbb7d23ea7ae80e422a5d
4
- data.tar.gz: 59e32fcc08b223576f916b32e39f11444474d3815add10cb8df8ea290b4beb49
3
+ metadata.gz: d129fad452aa0ec9658552b68ceb58190d3fb93b722ca8913ad00a68784ce3dc
4
+ data.tar.gz: 45905a2d5413c9cf5828b2a106f2bf32946efc6ab1229cfd9ed3012fa58a7cc0
5
5
  SHA512:
6
- metadata.gz: e8090e437315b256f12e64dfff74b52d96734417af94d46dd5303aa74a41d2bf45b47d7abbb9d483f7f8794052e6bebaed336a0320c242b9a1c4eecfdde4cf69
7
- data.tar.gz: bb359062fd81a8129bd48b3548bb4db513e6211bc1740003082e759d6cc5a3ba10abbf0db4e2d9a515c181b9b15b15950eafe9d733104a00e1f0789c20400750
6
+ metadata.gz: e91aa9acdb965944b192c23d2a43bebc49d25933b7152f56b99a3175311f4e84a7c0460961bb076b16a4cdfde648e19dc8ac072db35fd4414a3ecbdefb806b7a
7
+ data.tar.gz: b00fb2431da652f0cadd628bffb601c19434ba0fdd53d9ac99d463d7c6c2e365199efa271a90ada917e4d54e941c024a9f4dd990b7bc1bd4a24f4ffef87b55b0
@@ -9,6 +9,14 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
9
9
  ### Breaking changes
10
10
 
11
11
 
12
+ ## 2.9.0 2020-01-03
13
+
14
+ ### Compatible changes
15
+ - Fixes [#37](https://github.com/makandra/geordi/issues/37): `geordi cucumber` crashes with `--format=pretty`
16
+ - Fixes [#27](https://github.com/makandra/geordi/issues/27): Cucumber rerun switch does work when passing files
17
+ ### Breaking changes
18
+
19
+
12
20
  ## 2.8.0 2020-01-02
13
21
 
14
22
  ### Compatible changes
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- geordi (2.8.0)
4
+ geordi (2.9.0)
5
5
  thor (>= 0.18.0)
6
6
 
7
7
  GEM
@@ -64,6 +64,63 @@ Feature: The cucumber command
64
64
  And the output should contain "Features failed."
65
65
 
66
66
 
67
+ Scenario: A rerun should only consider the specified file
68
+ Note that we need a cucumber.yml to write the rerun.txt and read the rerun.txt for the reruns.
69
+
70
+ Given a file named "features/step_definitions/test_steps.rb" with:
71
+ """
72
+ Given /^this test fails$/ do
73
+ raise
74
+ end
75
+
76
+ Given /^I use puts with text "(.*)"$/ do |ann|
77
+ puts(ann)
78
+ end
79
+ """
80
+ And a file named "features/some.feature" with:
81
+ """
82
+ Feature: Failing feature
83
+ Scenario: Passing scenario
84
+ And I use puts with text "Running passing Feature"
85
+
86
+ Scenario: Failing scenario
87
+ And I use puts with text "Running failing Feature"
88
+ And this test fails
89
+ """
90
+ And an empty file named "tmp/rerun.txt"
91
+ And a file named "cucumber.yml" with:
92
+ """
93
+ <%
94
+ rerun_log = 'tmp/rerun.txt'
95
+ rerun_failures = File.file?(rerun_log) ? File.read(rerun_log).gsub("\n", ' ') : ''
96
+ log_failures = "--format=rerun --out=#{rerun_log}"
97
+ %>
98
+ default: features <%= log_failures %>
99
+ rerun: <%= rerun_failures %> <%= log_failures %>
100
+ """
101
+
102
+ When I run `geordi cucumber --rerun=1 features/some.feature`
103
+ Then the output should contain:
104
+ """
105
+ # Rerun #1 of 1
106
+ > Rerunning failed scenarios
107
+ > Run `geordi vnc` to view the Selenium test browsers
108
+
109
+ Using the rerun profile...
110
+
111
+ Running failing Feature
112
+ .F
113
+
114
+ (::) failed steps (::)
115
+
116
+ (RuntimeError)
117
+ features/some.feature:7:in `And this test fails'
118
+
119
+ Failing Scenarios:
120
+ cucumber -p rerun features/some.feature:5 # Scenario: Failing scenario
121
+ """
122
+
123
+
67
124
  Scenario: Running all features in a given subfolder
68
125
  Given a file named "features/sub/one.feature" with:
69
126
  """
@@ -191,3 +248,14 @@ Feature: The cucumber command
191
248
  When I run `geordi cucumber --containing given`
192
249
  Then the output should contain "Only: features/given.feature"
193
250
  But the output should not contain "other.feature"
251
+
252
+
253
+ Scenario: Passing a format argument will skip the default format for a single run
254
+ Given a file named "features/single.feature" with:
255
+ """
256
+ Feature: Running a single feature
257
+ Scenario: A single scenario
258
+ """
259
+
260
+ When I run `geordi cucumber features/single.feature --format=pretty --verbose`
261
+ Then the output should contain "b cucumber features/single.feature --format pretty"
@@ -88,7 +88,7 @@ def cucumber(*args)
88
88
  fail 'Features failed.' if (i == options.rerun) # All reruns done?
89
89
 
90
90
  announce "Rerun ##{ i + 1 } of #{ options.rerun }"
91
- break if Geordi::Cucumber.new.run(files, cmd_opts, :verbose => options.verbose, :parallel => false)
91
+ break if Geordi::Cucumber.new.run([], cmd_opts, :verbose => options.verbose, :parallel => false)
92
92
  end
93
93
  end
94
94
 
@@ -16,7 +16,7 @@ module Geordi
16
16
  VNC_ENV_VARIABLES = %w[DISPLAY BROWSER LAUNCHY_BROWSER]
17
17
 
18
18
  def run(files, cucumber_options, options = {})
19
- self.argv = files + cucumber_options
19
+ self.argv = files + cucumber_options.map { |option| option.split('=') }.flatten
20
20
 
21
21
  consolidate_rerun_txt_files
22
22
  show_features_to_run
@@ -1,3 +1,3 @@
1
1
  module Geordi
2
- VERSION = '2.8.0'
2
+ VERSION = '2.9.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geordi
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-02 00:00:00.000000000 Z
11
+ date: 2020-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor