Skip to content

Commit

Permalink
Merge pull request #100 from rspec/add-ruby-34
Browse files Browse the repository at this point in the history
Add support for Ruby 3.4.0
  • Loading branch information
JonRowe authored Nov 4, 2024
2 parents ef5d6c8 + 38955ea commit b4a28c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
strategy:
matrix:
ruby:
- '3.4'
- '3.3'
- '3.2'
- '3.1'
Expand Down
2 changes: 1 addition & 1 deletion features/its.feature
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Feature: attribute of subject
When I run rspec
Then the example should fail
And the output should contain "Failure/Error: its(:foo) { will_not raise_error }"
And the output should contain "expected no Exception, got #<NoMethodError: undefined method `foo'"
And the output should match /expected no Exception, got #<NoMethodError: undefined method [`']foo'/

Scenario: examples will warn when using non block expectations
Given a file named "example_spec.rb" with:
Expand Down
4 changes: 4 additions & 0 deletions script/test_all
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ if ruby -e "exit(defined?(RUBY_PLATFORM) && RUBY_PLATFORM == 'java')"; then
# This is JRUBY which requires this one weird path trick...
PATH="${PWD}/bin:$PATH" \
bundle exec cucumber --strict
elif ruby -e "exit(RUBY_VERSION.to_f >= 3.4)"; then
# This is a monkey patch to fix an issue with cucumber using outdated hash syntax, remove when cucumber is updated or ruby 3.4 released
sed -i '$i\class Hash; alias :__initialize :initialize; def initialize(*args, **_kw, &block) = __initialize(*args, &block); end' bin/cucumber
bin/cucumber --strict
else
bundle exec cucumber --strict
fi;

0 comments on commit b4a28c0

Please sign in to comment.