diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-12-13 14:51:23 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-12-13 14:51:23 +0100 |
commit | 84290a452dcdd2271337e2301b846c9498b74c86 (patch) | |
tree | 0693203e332944e1fb847be5700e35eb22bf851d /spec/lib/gitlab/routing_spec.rb | |
parent | 00970606d78486a8b6672659e9ea28521a102e44 (diff) | |
download | gitlab-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.rb | 23 |
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 |