Add response including Add f_http_client_response_including RSpec matcher with Ruby 3.2-4.0 support#21
Merged
Conversation
- Add new matcher to test HTTParty::Response objects - Supports nested RSpec matchers (have_attributes, a_hash_including, etc.) - Works with FService's .and_value() and .and_error() matchers - Provides clear failure messages - Fix Ruby 4.0+ compatibility: - Update activesupport to >= 7.2 - Add ostruct, csv, benchmark, racc gems - Update RuboCop config (plugins, rename PredicateName → PredicatePrefix) - Update documentation with usage examples
- Add rubocop-vicenzo plugin - Configure layout cops for consistent argument and method call formatting - Apply new formatting rules to codebase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tipo de alteração
Detalhes da solução
Nova Feature: Matcher
f_http_client_response_includingAdiciona um novo matcher RSpec que permite testar objetos
HTTParty::Responsede forma mais expressiva e clara.Funcionalidades:
.and_value()e.and_error()do FServiceExemplo de uso:
Atualização do CI
Atualiza o workflow de CI para rodar com Ruby 3.2, 3.3 e 4.0 nas versões mais recentes, garantindo compatibilidade com as versões modernas do Ruby.
Compatibilidade com Ruby 4.0+
activesupportpara >= 7.2Contexto Adicional
A implementação deste matcher facilita a escrita de testes para respostas HTTP, especialmente quando combinado com o FService.
TO-DO
N/A
Checklist