summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/routing_spec.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-12-13 14:51:23 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-12-13 14:51:23 +0100
commit84290a452dcdd2271337e2301b846c9498b74c86 (patch)
tree0693203e332944e1fb847be5700e35eb22bf851d /spec/lib/gitlab/routing_spec.rb
parent00970606d78486a8b6672659e9ea28521a102e44 (diff)
downloadgitlab-ce-84290a452dcdd2271337e2301b846c9498b74c86.tar.gz
Make it possible to mix `Gitlab::Routing` in
Diffstat (limited to 'spec/lib/gitlab/routing_spec.rb')
-rw-r--r--spec/lib/gitlab/routing_spec.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/lib/gitlab/routing_spec.rb b/spec/lib/gitlab/routing_spec.rb
new file mode 100644
index 00000000000..01d5acfc15b
--- /dev/null
+++ b/spec/lib/gitlab/routing_spec.rb
@@ -0,0 +1,23 @@
+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