You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also tried to get match_json_expression(pattern), this is JsonExpressions::RSpec::Matchers::MatchJsonExpression, but does not contain "captures" either.
So I included the require 'json_expressions/minitest' to be able to use the minitest
matcher=assert_json_matchpattern,response.body
But is that right approach?
Thank you very much,
Petr
The text was updated successfully, but these errors were encountered:
If you're using the expect(response.body).to match_json_expression(pattern) syntax, it seems that pattern is modified with the captures. Ie, you can access it using pattern.captures[:user_id].
Hi guys,
json_expressions are really cool! Thanks.
But I am unable to find out how to use "captures" with Rspec, is it possible?
The example shows how to use it with MiniTest:
But In Rspec, if I use it like this:
but matcher is "true"...
I also tried to get match_json_expression(pattern), this is JsonExpressions::RSpec::Matchers::MatchJsonExpression, but does not contain "captures" either.
So I included the require 'json_expressions/minitest' to be able to use the minitest
But is that right approach?
Thank you very much,
Petr
The text was updated successfully, but these errors were encountered: