Commit e3d2304d authored by Robert Speicher's avatar Robert Speicher

Specs don't need to set default_url_options anymore

parent 2c905797
require 'spec_helper' require 'spec_helper'
feature 'Users' do feature 'Users' do
around do |ex|
old_url_options = Rails.application.routes.default_url_options
Rails.application.routes.default_url_options = { host: 'example.foo' }
ex.run
Rails.application.routes.default_url_options = old_url_options
end
scenario 'GET /users/sign_in creates a new user account' do scenario 'GET /users/sign_in creates a new user account' do
visit new_user_session_path visit new_user_session_path
fill_in 'user_name', with: 'Name Surname' fill_in 'user_name', with: 'Name Surname'
......
...@@ -4,17 +4,6 @@ ...@@ -4,17 +4,6 @@
module ReferenceFilterSpecHelper module ReferenceFilterSpecHelper
extend ActiveSupport::Concern extend ActiveSupport::Concern
included do
before { set_default_url_options }
end
# Allow *_url helpers to work
def set_default_url_options
Rails.application.routes.default_url_options = {
host: 'example.foo'
}
end
# Shortcut to Rails' auto-generated routes helpers, to avoid including the # Shortcut to Rails' auto-generated routes helpers, to avoid including the
# module # module
def urls def urls
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment