Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorEvan Read <eread@gitlab.com>2022-06-23 03:28:35 +0300
committerClayton Cornell <ccornell@gitlab.com>2022-06-23 03:28:35 +0300
commitf7e3c0c1e4e096b14658e21d31eef4aa0c2f3c4a (patch)
treeff66d6ec0696c6bf778a7b12011ed655ea8f8cd8 /spec
parent5d5fe32fd1c68f182acfe889038af859d381c911 (diff)
Revert "Merge branch 'bwill/refactor-edit-on-gitlab' into 'main'"
Diffstat (limited to 'spec')
-rw-r--r--spec/helpers/edit_on_gitlab_spec.rb49
-rw-r--r--spec/spec_helper.rb1
2 files changed, 0 insertions, 50 deletions
diff --git a/spec/helpers/edit_on_gitlab_spec.rb b/spec/helpers/edit_on_gitlab_spec.rb
deleted file mode 100644
index e0cf14fa..00000000
--- a/spec/helpers/edit_on_gitlab_spec.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require 'nanoc'
-require 'helpers/edit_on_gitlab'
-
-RSpec.describe Nanoc::Helpers::EditOnGitLab do
- let(:mock_class) { Class.new { extend Nanoc::Helpers::EditOnGitLab } }
- let(:identifier) { "/content/404.html" }
- let(:content_filename) { "content/404.html" }
-
- let(:mock_item) do
- item = Struct.new(:identifier, :content_filename)
- item.new(identifier, content_filename)
- end
-
- subject { mock_class.edit_on_gitlab(mock_item, editor: editor) }
-
- describe '#edit_on_gitlab' do
- using RSpec::Parameterized::TableSyntax
-
- where(:identifier, :editor, :expected_url) do
- "/omnibus/index.md" | :simple | "https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/master/doc/index.md"
- "/omnibus/index.md" | :webide | "https://gitlab.com/-/ide/project/gitlab-org/omnibus-gitlab/edit/master/-/doc/index.md"
- "/runner/index.md" | :simple | "https://gitlab.com/gitlab-org/gitlab-runner/-/blob/main/doc/index.md"
- "/runner/index.md" | :webide | "https://gitlab.com/-/ide/project/gitlab-org/gitlab-runner/edit/main/-/doc/index.md"
- "/charts/index.md" | :simple | "https://gitlab.com/gitlab-org/charts/gitlab/-/blob/master/doc/index.md"
- "/charts/index.md" | :webide | "https://gitlab.com/-/ide/project/gitlab-org/charts/gitlab/edit/master/-/doc/index.md"
- "/operator/index.md" | :simple | "https://gitlab.com/gitlab-org/cloud-native/gitlab-operator/-/blob/master/doc/index.md"
- "/operator/index.md" | :webide | "https://gitlab.com/-/ide/project/gitlab-org/cloud-native/gitlab-operator/edit/master/-/doc/index.md"
- "/ee/user/ssh.md" | :simple | "https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/user/ssh.md"
- "/ee/user/ssh.md" | :webide | "https://gitlab.com/-/ide/project/gitlab-org/gitlab/edit/master/-/doc/user/ssh.md"
- "/content/404.html" | :simple | "https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/content/404.html"
- "/content/404.html" | :webide | "https://gitlab.com/-/ide/project/gitlab-org/gitlab-docs/edit/main/-/content/404.html"
- end
-
- with_them do
- it 'returns correct url for identifier and editor' do
- expect(subject).to eq(expected_url)
- end
- end
-
- context 'with unknown editor' do
- let(:editor) { :word }
-
- it { expect { subject }.to raise_error("Unknown editor: word") }
- end
- end
-end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 762c465b..43596af8 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -2,7 +2,6 @@
$LOAD_PATH << 'lib/'
-require 'rspec-parameterized'
require 'gitlab/docs'
RSpec.configure do |config|