gitlab-org--gitlab-foss/spec/support/relative_url.rb
Stan Hu 8820785c8f Fix emoji URLs in Markdown when relative_url_root is used
Also adds the ability to run rspecs with relative_url_defined on the enviornment. For example:

RELATIVE_URL_ROOT=/gitlab rspec

Closes #1728
2015-09-06 09:46:10 -07:00

8 lines
210 B
Ruby

# Fix route helpers in tests (e.g. root_path, ...)
module RelativeUrl
extend ActiveSupport::Concern
included do
default_url_options[:script_name] = Rails.application.config.relative_url_root
end
end