karmaTrinlema
4 years agoOccasional Contributor
failing cucumber test: not detecting flash message
I have a surprisingly simple cucumber scenario for a rails 4 app that isn't passing. I am checking that a flash message got set, and this test fails when I run cucumber. However, it is all correct, set, appearing, etc. when I run it live. I could really use some insight about what might be happening.
THANKS!
Hi,
This works for me....
import groovy.json.JsonSlurper import java.io.File; def resp = context.expand( '${Some Request#Response}' ).toString(); def response = new JsonSlurper().parseText(resp); log.info(response.toString()); // I'm on Windows, escape the double backslash File myFile = new File("c:\\Temp\\json2.json"); // Reponse might 'log', but its not a string. Stringify it. myFile.write(response.toString());