require 'simplecov'
SimpleCov.start 'rails'
require 'cucumber/rails'
require 'capybara/poltergeist'
require 'email_spec/cucumber'

Capybara.javascript_driver = :poltergeist
Capybara.default_selector = :css
Capybara.asset_host = "http://localhost:3000"
# Capybara.automatic_reload = false
Capybara.default_wait_time = 2

# By default, any exception happening in your Rails application will bubble up
# to Cucumber so that your scenario will fail. This is a different from how
# your application behaves in the production environment, where an error page will
# be rendered instead.
#
# Sometimes we want to override this default behaviour and allow Rails to rescue
# exceptions and display an error page (just like when the app is running in production).
# Typical scenarios where you want to do this is when you test your error pages.
# There are two ways to allow Rails to rescue exceptions:
#
# 1) Tag your scenario (or feature) with @allow-rescue
#
# 2) Set the value below to true. Beware that doing this globally is not
# recommended as it will mask a lot of errors for you!
#
ActionController::Base.allow_rescue = false
