diff options
| author | Sean McGivern <sean@mcgivern.me.uk> | 2018-10-26 12:57:43 +0000 |
|---|---|---|
| committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-10-26 12:57:43 +0000 |
| commit | 359474a29ee925faf51322707f9c11272542cfd7 (patch) | |
| tree | 35df4ab6112cd7d223863aa08437d91232906257 /spec/lib | |
| parent | dbe15b4add90f6ddd38e1c8a299c05a55ebb75ff (diff) | |
| parent | 84e441d808744fe084a81939e187e98ead23d7a8 (diff) | |
| download | gitlab-ce-359474a29ee925faf51322707f9c11272542cfd7.tar.gz | |
Merge branch '7864-ee-routes' into 'master'
CE: Put EE routes in EE files under EE directories
See merge request gitlab-org/gitlab-ce!22376
Diffstat (limited to 'spec/lib')
| -rw-r--r-- | spec/lib/gitlab/patch/draw_route_spec.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/lib/gitlab/patch/draw_route_spec.rb b/spec/lib/gitlab/patch/draw_route_spec.rb new file mode 100644 index 00000000000..4009b903dc3 --- /dev/null +++ b/spec/lib/gitlab/patch/draw_route_spec.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +require 'fast_spec_helper' + +describe Gitlab::Patch::DrawRoute do + subject do + Class.new do + include Gitlab::Patch::DrawRoute + + def route_path(route_name) + File.expand_path("../../../../#{route_name}", __dir__) + end + end.new + end + + before do + allow(subject).to receive(:instance_eval) + end + + it 'evaluates CE only route' do + subject.draw(:help) + + expect(subject).to have_received(:instance_eval) + .with(File.read(subject.route_path('config/routes/help.rb'))) + .once + + expect(subject).to have_received(:instance_eval) + .once + end +end |
