Skip to content

Commit

Permalink
Merge pull request #689 from freerange/ruby-3.4-backtick
Browse files Browse the repository at this point in the history
More fixes in preparation for Ruby v3.4
  • Loading branch information
floehopper authored Dec 7, 2024
2 parents bc144ae + 009f348 commit 727ce52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ workflows:
- ruby:3.1
- ruby:3.2
- ruby:3.3
- ruby:3.4.0-preview2
- ruby:latest
- jruby:latest
gemfile:
Expand Down
5 changes: 4 additions & 1 deletion test/integration/shared_tests.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'test_runner'
require 'execution_point'
require 'mocha/ruby_version'

# rubocop:disable Metrics/ModuleLength
module SharedTests
Expand Down Expand Up @@ -156,6 +157,8 @@ def test_real_object_unsatisfied_expectation
end

def test_real_object_expectation_does_not_leak_into_subsequent_test
opening_quote = Mocha::RUBY_V34_PLUS ? "'" : '`'

execution_point = nil
klass = Class.new
test_result = run_as_tests(
Expand All @@ -170,7 +173,7 @@ def test_real_object_expectation_does_not_leak_into_subsequent_test
assert_errored(test_result)
exception = test_result.errors.first.exception
assert_equal execution_point, ExecutionPoint.new(exception.backtrace)
assert_match(/undefined method `foo'/, exception.message)
assert_match(/undefined method #{opening_quote}foo'/, exception.message)
end

def test_leaky_mock
Expand Down

0 comments on commit 727ce52

Please sign in to comment.