rspec testsuite fails with ruby4.0.0dev 2025-11-24
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- ruby
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Chạy bộ kiểm thử RSpec với thay đổi Ruby 4.0.0dev được đề cập và kiểm tra spec/compliance_spec.rb, spec/implicit_conversion_spec.rb cùng spec/compliance/identifiers.json. Truy vết dữ liệu UTF-8 không hợp lệ được JSON::GeneratorError báo cáo, sau đó xác minh rằng toàn bộ bộ kiểm thử được nạp và chạy thành công mà không xóa fixture identifiers.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Beginning with this ruby4.0.0dev commit:
https://github.com/ruby/ruby/commit/c7a84ae0bb8c6dab3463076d7e5ca9b6f89880f4
(Or for ruby/json: beginning with this commit:
https://github.com/ruby/json/commit/4f4551f993bf1642eb8e0a18152306c5b25b18ea
)
jmespath git head ( https://github.com/jmespath/jmespath.rb/commit/5e86ea7da2e954cc12f5b3a8383a43c0a65acba7 )
rspec testsuite fails like:
An error occurred while loading ./spec/compliance_spec.rb.
Failure/Error:
describe("Given #{scenario['given'].to_json}") do
scenario['cases'].each do |test_case|
if test_case['error']
it "the expression #{test_case['expression'].inspect} raises a #{test_case['error']} error" do
error_class = case test_case['error']
when 'runtime' then JMESPath::Errors::RuntimeError
when 'syntax' then JMESPath::Errors::SyntaxError
when 'invalid-type' then JMESPath::Errors::InvalidTypeError
when 'invalid-value' then JMESPath::Errors::InvalidValueError
JSON::GeneratorError:
source sequence is illegal/malformed utf-8
# ./spec/compliance_spec.rb:12:in 'JSON::Ext::Generator::GeneratorMethods::Hash#to_json'
# ./spec/compliance_spec.rb:12:in 'block (4 levels) in <top (required)>'
# ./spec/compliance_spec.rb:11:in 'Array#each'
# ./spec/compliance_spec.rb:11:in 'block (3 levels) in <top (required)>'
# ./spec/compliance_spec.rb:10:in 'block (2 levels) in <top (required)>'
# ./spec/compliance_spec.rb:5:in 'Array#each'
# ./spec/compliance_spec.rb:5:in 'block in <top (required)>'
# ./spec/compliance_spec.rb:4:in '<top (required)>'
An error occurred while loading ./spec/implicit_conversion_spec.rb.
Failure/Error:
describe("Given #{scenario['given'].to_json}") do
scenario['cases'].each do |test_case|
next if test_case['error']
it "searching #{test_case['expression'].inspect} returns #{test_case['result'].to_json}" do
result = JMESPath.search(test_case['expression'], Wrapper.wrap(scenario['given']))
expect(JMESPath::Util.as_json(result)).to eq(test_case['result'])
end
end
end
JSON::GeneratorError:
source sequence is illegal/malformed utf-8
# ./spec/implicit_conversion_spec.rb:65:in 'JSON::Ext::Generator::GeneratorMethods::Hash#to_json'
# ./spec/implicit_conversion_spec.rb:65:in 'block (5 levels) in <module:JMESPath>'
# ./spec/implicit_conversion_spec.rb:64:in 'Array#each'
# ./spec/implicit_conversion_spec.rb:64:in 'block (4 levels) in <module:JMESPath>'
# ./spec/implicit_conversion_spec.rb:63:in 'block (3 levels) in <module:JMESPath>'
# ./spec/implicit_conversion_spec.rb:58:in 'Array#each'
# ./spec/implicit_conversion_spec.rb:58:in 'block (2 levels) in <module:JMESPath>'
# ./spec/implicit_conversion_spec.rb:57:in 'block in <module:JMESPath>'
# ./spec/implicit_conversion_spec.rb:37:in '<module:JMESPath>'
# ./spec/implicit_conversion_spec.rb:36:in '<top (required)>'
Finished in 0.00007 seconds (files took 0.5614 seconds to load)
0 examples, 0 failures, 2 errors occurred outside of examples
spec/compliance/identifiers.json is failing (if I remove this json file, rspec testsuite passes).
- Ngôn ngữ chính
- Ruby
- Star
- 167
- Fork
- 45
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của jmespath/jmespath.rb
-
Support arithmetic expressionsĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
jmespath/jmespath.rb#62 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
jmespath/jmespath.rb#25 · 3 bình luận ·
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
jmespath/jmespath.rb#17 ·
Tất cả issue của jmespath/jmespath.rb
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Shopify/shopify_app#2104 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
simp/pupmod-simp-simp#430 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Gateway 3.16 Admin API: correct the response schemas for GET /audit/requests and GET /audit/objectsĐang mởuser-reported
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Kong/developer.konghq.com#8382 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
simp/puppetsync#130 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
yegor256/iccq.github.io#181 ·
Maintainer thường phản hồi trong vòng 1 ngày