I\'m trying to test a JS confirmation dialog with Cucumber on Rails. I have a window.onbeforeunload event handler that will prompt you with a confirmation dialog if you try to n
You can use Webrat or Selenium with Cucumber to test this.
My guess is that you want Simulated Browser or Automated Browser testing,
You can use Webrat or Webrat::Selenium or simply Selenium with Cucumber in such cases.
I have tested this using Selenium and Cucumber before, but can't seem to find the code, will edit the post it if i do.
HTH