Skip to content

Commit ffcf2b5

Browse files
MONGOID-5317 Fix JRuby i18n test failures (#5254)
1 parent 27122e9 commit ffcf2b5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec/mongoid/errors/mongoid_error_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
let(:options) { {} }
1010

1111
before do
12-
if RUBY_VERSION >= '2.7'
12+
# JRuby 9.3 RUBY_VERSION is set to 2.6.8, but the behavior matches Ruby 2.7.
13+
# See https://github.com/jruby/jruby/issues/7184
14+
if RUBY_VERSION >= '2.7' || (BSON::Environment.jruby? && JRUBY_VERSION >= '9.3')
1315
{"message_title" => "message", "summary_title" => "summary", "resolution_title" => "resolution"}.each do |key, name|
1416
expect(::I18n).to receive(:translate).with("mongoid.errors.messages.#{key}", **{}).and_return(name)
1517
end

0 commit comments

Comments
 (0)