Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
os: [ubuntu]
# Lowest and Latest version.
ruby: ['2.7', '3.3']
ruby: ['2.7', '3.3', '3.4']
entry:
- { name: cucumber1_3, bats: test/cucumber.bats }
- { name: cucumber2_4, bats: test/cucumber.bats }
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ source 'https://rubygems.org'
gemspec

gem 'appraisal'
gem 'base64', '~> 0.2.0'
gem 'drb', '~> 2.2'
gem 'mutex_m', '~> 0.3.0'
gem 'rake'
gem 'rspec', '>= 2.13', '< 4.0'
gem 'rubocop', '~> 1.53.0'
Expand Down
3 changes: 3 additions & 0 deletions gemfiles/cucumber1_3.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
source 'https://rubygems.org'

gem 'cucumber', '~> 1.3.10'
gem 'drb', '~> 2.2'
gem 'logger', '~> 1.7'
gem 'mutex_m', '~> 0.3.0'
gem 'rake', '< 11.0'
gem 'rspec', '>= 2.13', '< 4.0'

Expand Down
2 changes: 2 additions & 0 deletions gemfiles/cucumber2_4.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
source 'https://rubygems.org'

gem 'cucumber', '~> 2.4.0'
gem 'drb', '~> 2.2'
gem 'mutex_m', '~> 0.3.0'
gem 'rake', '< 11.0'
gem 'rspec', '>= 2.13', '< 4.0'

Expand Down
2 changes: 2 additions & 0 deletions gemfiles/minitest5.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

source 'https://rubygems.org'

gem 'drb', '~> 2.2'
gem 'minitest', '5.10.0'
gem 'mutex_m', '~> 0.3.0'

gemspec path: '../'
2 changes: 2 additions & 0 deletions gemfiles/rspec3.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

source 'https://rubygems.org'

gem 'drb', '~> 2.2'
gem 'mutex_m', '~> 0.3.0'
gem 'rspec', '~> 3.12'

gemspec path: '../'
2 changes: 2 additions & 0 deletions gemfiles/rspec4.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

source 'https://rubygems.org'

gem 'drb', '~> 2.2'
gem 'mutex_m', '~> 0.3.0'
gem 'rspec', github: 'rspec/rspec-metagem', branch: '4-0-dev'
gem 'rspec-core', github: 'rspec/rspec-core', branch: '4-0-dev'
gem 'rspec-expectations', github: 'rspec/rspec-expectations', branch: '4-0-dev'
Expand Down
2 changes: 2 additions & 0 deletions gemfiles/testunit.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

source 'https://rubygems.org'

gem 'drb', '~> 2.2'
gem 'mutex_m', '~> 0.3.0'
gem 'test-unit'

gemspec path: '../'
2 changes: 2 additions & 0 deletions gemfiles/turnip.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

source 'https://rubygems.org'

gem 'drb', '~> 2.2'
gem 'mutex_m', '~> 0.3.0'
gem 'turnip', '~> 4.4'

gemspec path: '../'
20 changes: 19 additions & 1 deletion lib/test_queue/runner/cucumber.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ def to_s
title
end
end

class TreeWalker
private

def extract_method_name_from(call_stack)
if RUBY_VERSION >= '3.4.0'
call_stack[0].match(/in '(.*)'/).captures[0]
else
call_stack[0].match(/in `(.*)'/).captures[0]
end
end
end
end

class Runtime
Expand Down Expand Up @@ -54,7 +66,13 @@ def run_worker(iterator)
runtime = @test_framework.runtime
runtime.features = iterator

@test_framework.cli.execute!(runtime)
begin
@test_framework.cli.execute!(runtime)
rescue => e
warn "[worker #{Process.pid}] uncaught exception: #{e.class}: #{e.message}"
warn e.backtrace.join("\n")
exit! 1
end

if runtime.respond_to?(:summary_report, true)
runtime.send(:summary_report).test_cases.total_failed
Expand Down
4 changes: 2 additions & 2 deletions lib/test_queue/runner/testunit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ def initialize(name, iterator)
@tests = IteratorWrapper.new(iterator)
end

def run(*)
def run(...)
@started = true
super
super(...)
end

def size
Expand Down
6 changes: 3 additions & 3 deletions test/examples/features/step_definitions/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

When(/^bad$/) do
if ENV['FAIL']
1.should == 0
expect(1).to eq 0
else
1.should == 1
expect(1).to eq 1
end
end

Then(/^c$/) do
1.should == 1
expect(1).to eq 1
end
Loading