Forum Discussion

karmaTrinlema's avatar
karmaTrinlema
Occasional Contributor
4 years ago
Solved

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,...
  • karmaTrinlema's avatar
    karmaTrinlema
    3 years ago

    What I found out is that I have to check the flash message first because it is ephemeral.  I was checking which page I was on first.  I re-ran the test with put page.body and saw that when I swapped the order of the tests, I could see the flash message. 

     

    Thank you for your help.