Check Alert Message with Poltergeist or Capybara Webkit
accept_alert to get the alert message.
- Poltergeist ignores alerts/confirms by default(source)
- Poltergeist has had support for Capybaras modal api since September 2015( source)
That means you can same syntax for Poltergeist or capybara-webkit.
The first one
expect(accept_alert).to reads a bit weird, but that's the return value of