Specs don't need to set default_url_options anymore
This commit is contained in:
parent
2c90579749
commit
e3d2304d69
|
@ -1,13 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
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
|
||||
visit new_user_session_path
|
||||
fill_in 'user_name', with: 'Name Surname'
|
||||
|
|
|
@ -4,17 +4,6 @@
|
|||
module ReferenceFilterSpecHelper
|
||||
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
|
||||
# module
|
||||
def urls
|
||||
|
|
Loading…
Reference in New Issue