2019-08-22 06:57:44 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-12-13 08:51:23 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Gitlab::Routing do
|
|
|
|
context 'when module is included' do
|
|
|
|
subject do
|
|
|
|
Class.new.include(described_class).new
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'makes it possible to access url helpers' do
|
|
|
|
expect(subject).to respond_to(:namespace_project_path)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'when module is not included' do
|
|
|
|
subject do
|
|
|
|
Class.new.include(described_class.url_helpers).new
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'exposes url helpers module through a method' do
|
|
|
|
expect(subject).to respond_to(:namespace_project_path)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|