Skip to content

Commit bf4b022

Browse files
author
Brian Dunn
committed
upgrade cucumber
1 parent a93be35 commit bf4b022

File tree

17 files changed

+47
-42
lines changed

17 files changed

+47
-42
lines changed

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#
1010
# See https://github.com/rubocop-hq/rubocop/blob/master/manual/configuration.md
1111
#
12-
require:
12+
plugins:
1313
- rubocop-rake
1414
# - rubocop-rspec
1515

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gemspec name: 'flatware-cucumber'
55

66
group :development do
77
gem 'appraisal'
8-
gem 'aruba', '~> 0.14'
8+
gem 'aruba'
99
gem 'logger'
1010
gem 'ostruct'
1111
gem 'pry'

cucumber.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
default: --publish-quiet

features/step_definitions/flatware_steps.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def duration(&block)
7777
command = ['flatware', args, '-w', max_workers].flatten.compact.join(' ')
7878

7979
@duration = duration do
80-
run_command_and_stop(command, fail_on_exit: false)
80+
run_command(command)
8181
end
8282
end
8383

@@ -113,7 +113,7 @@ def duration(&block)
113113

114114
Then 'the output contains a backtrace' do
115115
trace = <<-TXT.gsub(/^ +/, '')
116-
features/flunk.feature:4:in `Given flunk'
116+
features/flunk.feature:4:in `flunk'
117117
TXT
118118

119119
expect(flatware_process).to have_output Regexp.new Regexp.escape trace

features/support/env.rb

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,10 @@
1414

1515
World(Module.new do
1616
def max_workers
17-
return 3 if travis?
18-
1917
Etc.nprocessors
2018
end
21-
22-
def travis?
23-
ENV.key? 'TRAVIS'
24-
end
2519
end)
2620

27-
Before do
28-
if travis?
29-
%i[
30-
command
31-
directory
32-
environment
33-
stderr
34-
stdout
35-
].each(&aruba.announcer.method(:activate))
36-
end
37-
end
38-
3921
After do |_scenario|
4022
all_commands.reject(&:stopped?).each do |command|
4123
zombie_pids = Flatware.pids_of_group(command.pid)
@@ -54,10 +36,19 @@ def travis?
5436
end
5537
end
5638

57-
After 'not @non-zero' do |scenario|
58-
expect(flatware_process.exit_status).to eq 0 if flatware_process && (scenario.status == :passed)
59-
end
39+
expect_flatware_exit = lambda do |expected_status|
40+
lambda do |scenario|
41+
return unless scenario.status == :passed && flatware_process
42+
43+
status = begin
44+
last_command_stopped.exit_status
45+
rescue Aruba::NoCommandHasBeenStoppedError
46+
flatware_process.wait.exitstatus
47+
end
6048

61-
After '@non-zero' do |scenario|
62-
expect(flatware_process.exit_status).to eq 1 if flatware_process && (scenario.status == :passed)
49+
expect(status).to eq expected_status
50+
end
6351
end
52+
53+
After('not @non-zero', &expect_flatware_exit.call(0))
54+
After('@non-zero', &expect_flatware_exit.call(1))

flatware-cucumber.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
2222
s.licenses = ['MIT']
2323
s.required_ruby_version = ['>= 2.6', '< 3.5']
2424
s.require_paths = ['lib']
25-
s.add_dependency %(cucumber), '~> 3.0'
25+
s.add_dependency %(cucumber), '~> 9.1'
2626
s.add_dependency %(flatware), Flatware::VERSION
2727
# s.metadata['rubygems_mfa_required'] = 'true'
2828
end

gemfiles/rspec_3.10.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ gem "rspec", "3.10.0"
66

77
group :development do
88
gem "appraisal"
9-
gem "aruba", "~> 0.14"
9+
gem "aruba"
1010
gem "pry"
1111
gem "racc"
1212
gem "rake"

gemfiles/rspec_3.11.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ gem "rspec", "3.11.0"
66

77
group :development do
88
gem "appraisal"
9-
gem "aruba", "~> 0.14"
9+
gem "aruba"
1010
gem "pry"
1111
gem "racc"
1212
gem "rake"

gemfiles/rspec_3.12.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ gem "rspec", "3.12.0"
66

77
group :development do
88
gem "appraisal"
9-
gem "aruba", "~> 0.14"
9+
gem "aruba"
1010
gem "pry"
1111
gem "racc"
1212
gem "rake"

gemfiles/rspec_3.13.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ gem "rspec", "3.13.0"
66

77
group :development do
88
gem "appraisal"
9-
gem "aruba", "~> 0.14"
9+
gem "aruba"
1010
gem "pry"
1111
gem "racc"
1212
gem "rake"

0 commit comments

Comments
 (0)