Assessing several rspec expectations with a cucumber

I use rspec wait with cucumber. It seems that when using multiple expectations on cucumber lakes, the cucumber evaluates them until the first of them works. However, I want to continue working, and others expect to get a clear idea of ​​what went wrong. Can I somehow achieve this?

Example: - suppose the answer = "1", code = "2" and status = "3"

expect(response).to eq("0")
expect(code).to eq("2")
expect(status).to eq("1")

When evaluating the response variable, cucumbers will fail. But I want to check the value of the other two variables and get the output for the wrong status value. Is it possible?

+4
source share
1 answer

:

expect({
  response: response,
  code: code,
  status: status}
).to eq({ response: "0", code: "2", status: "1" })

, -, .

+3

Source: https://habr.com/ru/post/1616710/


All Articles