Skip to content

Commit

Permalink
Merge pull request #914 from cucumber/prepare-for-ruby-3-3
Browse files Browse the repository at this point in the history
Prepare for Ruby 3.3
  • Loading branch information
mvz authored Dec 24, 2023
2 parents 0e95bbf + fd45d9e commit 5371abc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

strategy:
matrix:
ruby: ["3.1", "3.2", "jruby-9.4"]
ruby: ["3.1", "3.2", "jruby-9.4", "3.3.0-preview3"]
appraisal: [cucumber_8, cucumber_9]
include:
- ruby: "2.7"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ Feature: Debug your command in cucumber-test-run
Scenario: You can use a debug repl in your cli program

If you want to debug an error, which only occurs in one of your
`cucumber`-tests, the `@debug`-tag becomes handy. This will use the
Cucumber tests, the `@debug`-tag becomes handy. This will use the
DebugProcess runner, making your program use the default stdin, stdout and
stderr streams so you can interact with it directly.

This will, for example, make `binding.pry` and `byebug` work in your
This will, for example, make `binding.irb` and `byebug` work in your
program. However, Aruba steps that access the input and output of your
program will not work.

We are going to demonstrate this using `pry`, but any other interactive
We are going to demonstrate this using `irb`, but any other interactive
debugger for any other programming language should also work.

Given an executable named "bin/aruba-test-cli" with:
Expand All @@ -27,8 +27,7 @@ Feature: Debug your command in cucumber-test-run
foo = 'hello'
require 'pry'
binding.pry
binding.irb
"""
And a file named "features/debug.feature" with:
"""cucumber
Expand All @@ -44,9 +43,9 @@ Feature: Debug your command in cucumber-test-run
And I type "exit"
Then the output should contain:
"""
[1] pry(main)> foo
=> "hello"
[2] pry(main)> exit
foo
"hello"
exit
"""

Scenario: Can handle announcers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Feature: Wait for output of commands
"""cucumber
Feature: Run command
Scenario: Run command
When I run `irb --prompt default` interactively
When I run `irb --prompt classic` interactively
And I wait for output to contain "irb"
And I type "puts 6 + 5"
And I type "exit"
Expand All @@ -32,7 +32,7 @@ Feature: Wait for output of commands
"""cucumber
Feature: Run command
Scenario: Run command
When I run `irb --prompt default` interactively
When I run `irb --prompt classic` interactively
And I wait for output to contain:
\"\"\"
irb(main):001:0>
Expand All @@ -49,7 +49,7 @@ Feature: Wait for output of commands
"""cucumber
Feature: Run command
Scenario: Run command
When I run `irb --prompt default` interactively
When I run `irb --prompt classic` interactively
And I wait for output to contain:
\"\"\"
irb(main):001:0>
Expand Down
1 change: 0 additions & 1 deletion lib/aruba/console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def start
IRB.conf[:RC] = false

require "irb/completion"
require "irb/ext/save-history"
IRB.conf[:READLINE] = true
IRB.conf[:SAVE_HISTORY] = 1000
IRB.conf[:HISTORY_FILE] = Aruba.config.console_history_file
Expand Down

0 comments on commit 5371abc

Please sign in to comment.