Commit ddccd24c authored by Rémy Coutable's avatar Rémy Coutable

Remove superfluous lib: true, type: redis, service: true, models: true,...

Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 7e113b68
require 'spec_helper' require 'spec_helper'
require 'rainbow/ext/string' require 'rainbow/ext/string'
describe 'seed production settings', lib: true do describe 'seed production settings' do
include StubENV include StubENV
let(:settings_file) { Rails.root.join('db/fixtures/production/010_settings.rb') } let(:settings_file) { Rails.root.join('db/fixtures/production/010_settings.rb') }
let(:settings) { Gitlab::CurrentSettings.current_application_settings } let(:settings) { Gitlab::CurrentSettings.current_application_settings }
......
require 'rails_helper' require 'rails_helper'
describe 'Markdown References', :feature, :js do describe 'Markdown References', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:actual_project) { create(:project, :public) } let(:actual_project) { create(:project, :public) }
let(:merge_request) { create(:merge_request, target_project: actual_project, source_project: actual_project)} let(:merge_request) { create(:merge_request, target_project: actual_project, source_project: actual_project)}
......
require 'spec_helper' require 'spec_helper'
describe AccessRequestsFinder, services: true do describe AccessRequestsFinder do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:access_requester) { create(:user) } let(:access_requester) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
require_relative '../../config/initializers/6_validations.rb' require_relative '../../config/initializers/6_validations.rb'
describe '6_validations', lib: true do describe '6_validations' do
before :all do before :all do
FileUtils.mkdir_p('tmp/tests/paths/a/b/c/d') FileUtils.mkdir_p('tmp/tests/paths/a/b/c/d')
FileUtils.mkdir_p('tmp/tests/paths/a/b/c2') FileUtils.mkdir_p('tmp/tests/paths/a/b/c2')
......
require 'spec_helper' require 'spec_helper'
describe 'instrument_classes', lib: true do describe 'instrument_classes' do
let(:config) { double(:config) } let(:config) { double(:config) }
let(:unicorn_sampler) { double(:unicorn_sampler) } let(:unicorn_sampler) { double(:unicorn_sampler) }
......
require 'spec_helper' require 'spec_helper'
require_relative '../../config/initializers/secret_token' require_relative '../../config/initializers/secret_token'
describe 'create_tokens', lib: true do describe 'create_tokens' do
include StubENV include StubENV
let(:secrets) { ActiveSupport::OrderedOptions.new } let(:secrets) { ActiveSupport::OrderedOptions.new }
......
require 'spec_helper' require 'spec_helper'
require_relative '../../config/initializers/1_settings' require_relative '../../config/initializers/1_settings'
describe Settings, lib: true do describe Settings do
describe '#host_without_www' do describe '#host_without_www' do
context 'URL with protocol' do context 'URL with protocol' do
it 'returns the host' do it 'returns the host' do
......
require 'spec_helper' require 'spec_helper'
describe 'trusted_proxies', lib: true do describe 'trusted_proxies' do
context 'with default config' do context 'with default config' do
before do before do
set_trusted_proxies([]) set_trusted_proxies([])
......
require 'spec_helper' require 'spec_helper'
describe Banzai::CrossProjectReference, lib: true do describe Banzai::CrossProjectReference do
include described_class include described_class
describe '#project_from_ref' do describe '#project_from_ref' do
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::AsciiDocPostProcessingFilter, lib: true do describe Banzai::Filter::AsciiDocPostProcessingFilter do
include FilterSpecHelper include FilterSpecHelper
it "adds class for elements with data-math-style" do it "adds class for elements with data-math-style" do
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::AutolinkFilter, lib: true do describe Banzai::Filter::AutolinkFilter do
include FilterSpecHelper include FilterSpecHelper
let(:link) { 'http://about.gitlab.com/' } let(:link) { 'http://about.gitlab.com/' }
......
require 'rails_helper' require 'rails_helper'
describe Banzai::Filter::BlockquoteFenceFilter, lib: true do describe Banzai::Filter::BlockquoteFenceFilter do
include FilterSpecHelper include FilterSpecHelper
it 'converts blockquote fences to blockquote lines' do it 'converts blockquote fences to blockquote lines' do
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::CommitRangeReferenceFilter, lib: true do describe Banzai::Filter::CommitRangeReferenceFilter do
include FilterSpecHelper include FilterSpecHelper
let(:project) { create(:project, :public, :repository) } let(:project) { create(:project, :public, :repository) }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::CommitReferenceFilter, lib: true do describe Banzai::Filter::CommitReferenceFilter do
include FilterSpecHelper include FilterSpecHelper
let(:project) { create(:project, :public, :repository) } let(:project) { create(:project, :public, :repository) }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::EmojiFilter, lib: true do describe Banzai::Filter::EmojiFilter do
include FilterSpecHelper include FilterSpecHelper
before do before do
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::ExternalIssueReferenceFilter, lib: true do describe Banzai::Filter::ExternalIssueReferenceFilter do
include FilterSpecHelper include FilterSpecHelper
def helper def helper
......
...@@ -17,7 +17,7 @@ shared_examples 'an external link with rel attribute' do ...@@ -17,7 +17,7 @@ shared_examples 'an external link with rel attribute' do
end end
end end
describe Banzai::Filter::ExternalLinkFilter, lib: true do describe Banzai::Filter::ExternalLinkFilter do
include FilterSpecHelper include FilterSpecHelper
it 'ignores elements without an href attribute' do it 'ignores elements without an href attribute' do
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::GollumTagsFilter, lib: true do describe Banzai::Filter::GollumTagsFilter do
include FilterSpecHelper include FilterSpecHelper
let(:project) { create(:empty_project) } let(:project) { create(:empty_project) }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::HtmlEntityFilter, lib: true do describe Banzai::Filter::HtmlEntityFilter do
include FilterSpecHelper include FilterSpecHelper
let(:unescaped) { 'foo <strike attr="foo">&&&</strike>' } let(:unescaped) { 'foo <strike attr="foo">&&&</strike>' }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::ImageLinkFilter, lib: true do describe Banzai::Filter::ImageLinkFilter do
include FilterSpecHelper include FilterSpecHelper
def image(path) def image(path)
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::InlineDiffFilter, lib: true do describe Banzai::Filter::InlineDiffFilter do
include FilterSpecHelper include FilterSpecHelper
it 'adds inline diff span tags for deletions when using square brackets' do it 'adds inline diff span tags for deletions when using square brackets' do
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::IssuableStateFilter, lib: true do describe Banzai::Filter::IssuableStateFilter do
include ActionView::Helpers::UrlHelper include ActionView::Helpers::UrlHelper
include FilterSpecHelper include FilterSpecHelper
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::IssueReferenceFilter, lib: true do describe Banzai::Filter::IssueReferenceFilter do
include FilterSpecHelper include FilterSpecHelper
def helper def helper
......
require 'spec_helper' require 'spec_helper'
require 'html/pipeline' require 'html/pipeline'
describe Banzai::Filter::LabelReferenceFilter, lib: true do describe Banzai::Filter::LabelReferenceFilter do
include FilterSpecHelper include FilterSpecHelper
let(:project) { create(:empty_project, :public, name: 'sample-project') } let(:project) { create(:empty_project, :public, name: 'sample-project') }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::MarkdownFilter, lib: true do describe Banzai::Filter::MarkdownFilter do
include FilterSpecHelper include FilterSpecHelper
context 'code block' do context 'code block' do
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::MathFilter, lib: true do describe Banzai::Filter::MathFilter do
include FilterSpecHelper include FilterSpecHelper
it 'leaves regular inline code unchanged' do it 'leaves regular inline code unchanged' do
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::MergeRequestReferenceFilter, lib: true do describe Banzai::Filter::MergeRequestReferenceFilter do
include FilterSpecHelper include FilterSpecHelper
let(:project) { create(:empty_project, :public) } let(:project) { create(:empty_project, :public) }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::MilestoneReferenceFilter, lib: true do describe Banzai::Filter::MilestoneReferenceFilter do
include FilterSpecHelper include FilterSpecHelper
let(:project) { create(:empty_project, :public) } let(:project) { create(:empty_project, :public) }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::PlantumlFilter, lib: true do describe Banzai::Filter::PlantumlFilter do
include FilterSpecHelper include FilterSpecHelper
it 'should replace plantuml pre tag with img tag' do it 'should replace plantuml pre tag with img tag' do
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::RedactorFilter, lib: true do describe Banzai::Filter::RedactorFilter do
include ActionView::Helpers::UrlHelper include ActionView::Helpers::UrlHelper
include FilterSpecHelper include FilterSpecHelper
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::ReferenceFilter, lib: true do describe Banzai::Filter::ReferenceFilter do
let(:project) { build(:project) } let(:project) { build(:project) }
describe '#each_node' do describe '#each_node' do
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::RelativeLinkFilter, lib: true do describe Banzai::Filter::RelativeLinkFilter do
def filter(doc, contexts = {}) def filter(doc, contexts = {})
contexts.reverse_merge!({ contexts.reverse_merge!({
commit: commit, commit: commit,
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::SanitizationFilter, lib: true do describe Banzai::Filter::SanitizationFilter do
include FilterSpecHelper include FilterSpecHelper
describe 'default whitelist' do describe 'default whitelist' do
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::SnippetReferenceFilter, lib: true do describe Banzai::Filter::SnippetReferenceFilter do
include FilterSpecHelper include FilterSpecHelper
let(:project) { create(:empty_project, :public) } let(:project) { create(:empty_project, :public) }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::SyntaxHighlightFilter, lib: true do describe Banzai::Filter::SyntaxHighlightFilter do
include FilterSpecHelper include FilterSpecHelper
context "when no language is specified" do context "when no language is specified" do
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::TableOfContentsFilter, lib: true do describe Banzai::Filter::TableOfContentsFilter do
include FilterSpecHelper include FilterSpecHelper
def header(level, text) def header(level, text)
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::UploadLinkFilter, lib: true do describe Banzai::Filter::UploadLinkFilter do
def filter(doc, contexts = {}) def filter(doc, contexts = {})
contexts.reverse_merge!({ contexts.reverse_merge!({
project: project project: project
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::UserReferenceFilter, lib: true do describe Banzai::Filter::UserReferenceFilter do
include FilterSpecHelper include FilterSpecHelper
let(:project) { create(:empty_project, :public) } let(:project) { create(:empty_project, :public) }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::VideoLinkFilter, lib: true do describe Banzai::Filter::VideoLinkFilter do
def filter(doc, contexts = {}) def filter(doc, contexts = {})
contexts.reverse_merge!({ contexts.reverse_merge!({
project: project project: project
......
require 'spec_helper' require 'spec_helper'
describe Banzai::Filter::WikiLinkFilter, lib: true do describe Banzai::Filter::WikiLinkFilter do
include FilterSpecHelper include FilterSpecHelper
let(:namespace) { build_stubbed(:namespace, name: "wiki_link_ns") } let(:namespace) { build_stubbed(:namespace, name: "wiki_link_ns") }
......
require 'rails_helper' require 'rails_helper'
describe Banzai::Filter::YamlFrontMatterFilter, lib: true do describe Banzai::Filter::YamlFrontMatterFilter do
include FilterSpecHelper include FilterSpecHelper
it 'allows for `encoding:` before the frontmatter' do it 'allows for `encoding:` before the frontmatter' do
......
require 'spec_helper' require 'spec_helper'
describe Banzai::IssuableExtractor, lib: true do describe Banzai::IssuableExtractor do
let(:project) { create(:empty_project) } let(:project) { create(:empty_project) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:extractor) { described_class.new(project, user) } let(:extractor) { described_class.new(project, user) }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::ReferenceParser::BaseParser, lib: true do describe Banzai::ReferenceParser::BaseParser do
include ReferenceParserHelpers include ReferenceParserHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::ReferenceParser::CommitParser, lib: true do describe Banzai::ReferenceParser::CommitParser do
include ReferenceParserHelpers include ReferenceParserHelpers
let(:project) { create(:empty_project, :public) } let(:project) { create(:empty_project, :public) }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::ReferenceParser::CommitRangeParser, lib: true do describe Banzai::ReferenceParser::CommitRangeParser do
include ReferenceParserHelpers include ReferenceParserHelpers
let(:project) { create(:empty_project, :public) } let(:project) { create(:empty_project, :public) }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::ReferenceParser::ExternalIssueParser, lib: true do describe Banzai::ReferenceParser::ExternalIssueParser do
include ReferenceParserHelpers include ReferenceParserHelpers
let(:project) { create(:empty_project, :public) } let(:project) { create(:empty_project, :public) }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::ReferenceParser::IssueParser, lib: true do describe Banzai::ReferenceParser::IssueParser do
include ReferenceParserHelpers include ReferenceParserHelpers
let(:project) { create(:empty_project, :public) } let(:project) { create(:empty_project, :public) }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::ReferenceParser::LabelParser, lib: true do describe Banzai::ReferenceParser::LabelParser do
include ReferenceParserHelpers include ReferenceParserHelpers
let(:project) { create(:empty_project, :public) } let(:project) { create(:empty_project, :public) }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::ReferenceParser::MergeRequestParser, lib: true do describe Banzai::ReferenceParser::MergeRequestParser do
include ReferenceParserHelpers include ReferenceParserHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::ReferenceParser::MilestoneParser, lib: true do describe Banzai::ReferenceParser::MilestoneParser do
include ReferenceParserHelpers include ReferenceParserHelpers
let(:project) { create(:empty_project, :public) } let(:project) { create(:empty_project, :public) }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::ReferenceParser::SnippetParser, lib: true do describe Banzai::ReferenceParser::SnippetParser do
include ReferenceParserHelpers include ReferenceParserHelpers
let(:project) { create(:empty_project, :public) } let(:project) { create(:empty_project, :public) }
......
require 'spec_helper' require 'spec_helper'
describe Banzai::ReferenceParser::UserParser, lib: true do describe Banzai::ReferenceParser::UserParser do
include ReferenceParserHelpers include ReferenceParserHelpers
let(:group) { create(:group) } let(:group) { create(:group) }
......
require 'spec_helper' require 'spec_helper'
describe Ci::Ansi2html, lib: true do describe Ci::Ansi2html do
subject { described_class } subject { described_class }
it "prints non-ansi as-is" do it "prints non-ansi as-is" do
......
require 'spec_helper' require 'spec_helper'
describe Ci::Charts, lib: true do describe Ci::Charts do
context "pipeline_times" do context "pipeline_times" do
let(:project) { create(:empty_project) } let(:project) { create(:empty_project) }
let(:chart) { Ci::Charts::PipelineTime.new(project) } let(:chart) { Ci::Charts::PipelineTime.new(project) }
......
require 'spec_helper' require 'spec_helper'
describe Ci::MaskSecret, lib: true do describe Ci::MaskSecret do
subject { described_class } subject { described_class }
describe '#mask' do describe '#mask' do
......
require 'spec_helper' require 'spec_helper'
describe GroupUrlConstrainer, lib: true do describe GroupUrlConstrainer do
let!(:group) { create(:group, path: 'gitlab') } let!(:group) { create(:group, path: 'gitlab') }
describe '#matches?' do describe '#matches?' do
......
require 'spec_helper' require 'spec_helper'
describe ProjectUrlConstrainer, lib: true do describe ProjectUrlConstrainer do
let!(:project) { create(:empty_project) } let!(:project) { create(:empty_project) }
let!(:namespace) { project.namespace } let!(:namespace) { project.namespace }
......
require 'spec_helper' require 'spec_helper'
describe UserUrlConstrainer, lib: true do describe UserUrlConstrainer do
let!(:user) { create(:user, username: 'dz') } let!(:user) { create(:user, username: 'dz') }
describe '#matches?' do describe '#matches?' do
......
require 'spec_helper' require 'spec_helper'
describe DisableEmailInterceptor, lib: true do describe DisableEmailInterceptor do
before do before do
Mail.register_interceptor(DisableEmailInterceptor) Mail.register_interceptor(DisableEmailInterceptor)
end end
......
require 'spec_helper' require 'spec_helper'
describe EventFilter, lib: true do describe EventFilter do
describe '#apply_filter' do describe '#apply_filter' do
let(:source_user) { create(:user) } let(:source_user) { create(:user) }
let!(:public_project) { create(:empty_project, :public) } let!(:public_project) { create(:empty_project, :public) }
......
require 'spec_helper' require 'spec_helper'
describe ExtractsPath, lib: true do describe ExtractsPath do
include ExtractsPath include ExtractsPath
include RepoHelpers include RepoHelpers
include Gitlab::Routing include Gitlab::Routing
......
require 'spec_helper' require 'spec_helper'
describe Feature, lib: true do describe Feature do
describe '.get' do describe '.get' do
let(:feature) { double(:feature) } let(:feature) { double(:feature) }
let(:key) { 'my_feature' } let(:key) { 'my_feature' }
......
require 'spec_helper' require 'spec_helper'
describe FileSizeValidator, lib: true do describe FileSizeValidator do
let(:validator) { FileSizeValidator.new(options) } let(:validator) { FileSizeValidator.new(options) }
let(:attachment) { AttachmentUploader.new } let(:attachment) { AttachmentUploader.new }
let(:note) { create(:note) } let(:note) { create(:note) }
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
require 'nokogiri' require 'nokogiri'
module Gitlab module Gitlab
describe Asciidoc, lib: true do describe Asciidoc do
let(:input) { '<b>ascii</b>' } let(:input) { '<b>ascii</b>' }
let(:context) { {} } let(:context) { {} }
let(:html) { 'H<sub>2</sub>O' } let(:html) { 'H<sub>2</sub>O' }
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::Auth::UniqueIpsLimiter, :clean_gitlab_redis_shared_state, lib: true do describe Gitlab::Auth::UniqueIpsLimiter, :clean_gitlab_redis_shared_state do
include_context 'unique ips sign in limit' include_context 'unique ips sign in limit'
let(:user) { create(:user) } let(:user) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::Auth, lib: true do describe Gitlab::Auth do
let(:gl_auth) { described_class } let(:gl_auth) { described_class }
describe 'constants' do describe 'constants' do
......
require 'spec_helper' require 'spec_helper'
describe Backup::Manager, lib: true do describe Backup::Manager do
include StubENV include StubENV
let(:progress) { StringIO.new } let(:progress) { StringIO.new }
......
require 'spec_helper' require 'spec_helper'
describe Backup::Repository, lib: true do describe Backup::Repository do
let(:progress) { StringIO.new } let(:progress) { StringIO.new }
let!(:project) { create(:empty_project) } let!(:project) { create(:empty_project) }
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::BitbucketImport::Importer, lib: true do describe Gitlab::BitbucketImport::Importer do
include ImportSpecHelper include ImportSpecHelper
before do before do
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::BitbucketImport::ProjectCreator, lib: true do describe Gitlab::BitbucketImport::ProjectCreator do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:repo) do let(:repo) do
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::Blame, lib: true do describe Gitlab::Blame do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:path) { 'files/ruby/popen.rb' } let(:path) { 'files/ruby/popen.rb' }
let(:commit) { project.commit('master') } let(:commit) { project.commit('master') }
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::ChatNameToken, lib: true do describe Gitlab::ChatNameToken do
context 'when using unknown token' do context 'when using unknown token' do
let(:token) { } let(:token) { }
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::Checks::ChangeAccess, lib: true do describe Gitlab::Checks::ChangeAccess do
describe '#exec' do describe '#exec' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::Checks::ForcePush, lib: true do describe Gitlab::Checks::ForcePush do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
context "exit code checking" do context "exit code checking" do
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::CiAccess, lib: true do describe Gitlab::CiAccess do
let(:access) { Gitlab::CiAccess.new } let(:access) { Gitlab::CiAccess.new }
describe '#can_do_action?' do describe '#can_do_action?' do
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::ClosingIssueExtractor, lib: true do describe Gitlab::ClosingIssueExtractor do
let(:project) { create(:empty_project) } let(:project) { create(:empty_project) }
let(:project2) { create(:empty_project) } let(:project2) { create(:empty_project) }
let(:forked_project) { Projects::ForkService.new(project, project.creator).execute } let(:forked_project) { Projects::ForkService.new(project, project.creator).execute }
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::ColorSchemes, lib: true do describe Gitlab::ColorSchemes do
describe '.body_classes' do describe '.body_classes' do
it 'returns a space-separated list of class names' do it 'returns a space-separated list of class names' do
css = described_class.body_classes css = described_class.body_classes
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::Conflict::FileCollection, lib: true do describe Gitlab::Conflict::FileCollection do
let(:merge_request) { create(:merge_request, source_branch: 'conflict-resolvable', target_branch: 'conflict-start') } let(:merge_request) { create(:merge_request, source_branch: 'conflict-resolvable', target_branch: 'conflict-start') }
let(:file_collection) { described_class.read_only(merge_request) } let(:file_collection) { described_class.read_only(merge_request) }
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::Conflict::File, lib: true do describe Gitlab::Conflict::File do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:repository) { project.repository } let(:repository) { project.repository }
let(:rugged) { repository.rugged } let(:rugged) { repository.rugged }
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::Conflict::Parser, lib: true do describe Gitlab::Conflict::Parser do
let(:parser) { Gitlab::Conflict::Parser.new } let(:parser) { Gitlab::Conflict::Parser.new }
describe '#parse' do describe '#parse' do
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::CycleAnalytics::StageSummary, models: true do describe Gitlab::CycleAnalytics::StageSummary do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:from) { 1.day.ago } let(:from) { 1.day.ago }
let(:user) { create(:user, :admin) } let(:user) { create(:user, :admin) }
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::DataBuilder::Note, lib: true do describe Gitlab::DataBuilder::Note do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:data) { described_class.build(note, user) } let(:data) { described_class.build(note, user) }
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::DataBuilder::Push, lib: true do describe Gitlab::DataBuilder::Push do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::Database::MigrationHelpers, lib: true do describe Gitlab::Database::MigrationHelpers do
let(:model) do let(:model) do
ActiveRecord::Migration.new.extend( ActiveRecord::Migration.new.extend(
Gitlab::Database::MigrationHelpers Gitlab::Database::MigrationHelpers
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::Database, lib: true do describe Gitlab::Database do
before do before do
stub_const('MigrationTest', Class.new { include Gitlab::Database }) stub_const('MigrationTest', Class.new { include Gitlab::Database })
end end
......
require 'rails_helper' require 'rails_helper'
describe Gitlab::DependencyLinker::CartfileLinker, lib: true do describe Gitlab::DependencyLinker::CartfileLinker do
describe '.support?' do describe '.support?' do
it 'supports Cartfile' do it 'supports Cartfile' do
expect(described_class.support?('Cartfile')).to be_truthy expect(described_class.support?('Cartfile')).to be_truthy
......
require 'rails_helper' require 'rails_helper'
describe Gitlab::DependencyLinker::ComposerJsonLinker, lib: true do describe Gitlab::DependencyLinker::ComposerJsonLinker do
describe '.support?' do describe '.support?' do
it 'supports composer.json' do it 'supports composer.json' do
expect(described_class.support?('composer.json')).to be_truthy expect(described_class.support?('composer.json')).to be_truthy
......
require 'rails_helper' require 'rails_helper'
describe Gitlab::DependencyLinker::GemfileLinker, lib: true do describe Gitlab::DependencyLinker::GemfileLinker do
describe '.support?' do describe '.support?' do
it 'supports Gemfile' do it 'supports Gemfile' do
expect(described_class.support?('Gemfile')).to be_truthy expect(described_class.support?('Gemfile')).to be_truthy
......
require 'rails_helper' require 'rails_helper'
describe Gitlab::DependencyLinker::GemspecLinker, lib: true do describe Gitlab::DependencyLinker::GemspecLinker do
describe '.support?' do describe '.support?' do
it 'supports *.gemspec' do it 'supports *.gemspec' do
expect(described_class.support?('gitlab_git.gemspec')).to be_truthy expect(described_class.support?('gitlab_git.gemspec')).to be_truthy
......
require 'rails_helper' require 'rails_helper'
describe Gitlab::DependencyLinker::GodepsJsonLinker, lib: true do describe Gitlab::DependencyLinker::GodepsJsonLinker do
describe '.support?' do describe '.support?' do
it 'supports Godeps.json' do it 'supports Godeps.json' do
expect(described_class.support?('Godeps.json')).to be_truthy expect(described_class.support?('Godeps.json')).to be_truthy
......
require 'rails_helper' require 'rails_helper'
describe Gitlab::DependencyLinker::PackageJsonLinker, lib: true do describe Gitlab::DependencyLinker::PackageJsonLinker do
describe '.support?' do describe '.support?' do
it 'supports package.json' do it 'supports package.json' do
expect(described_class.support?('package.json')).to be_truthy expect(described_class.support?('package.json')).to be_truthy
......
require 'rails_helper' require 'rails_helper'
describe Gitlab::DependencyLinker::PodfileLinker, lib: true do describe Gitlab::DependencyLinker::PodfileLinker do
describe '.support?' do describe '.support?' do
it 'supports Podfile' do it 'supports Podfile' do
expect(described_class.support?('Podfile')).to be_truthy expect(described_class.support?('Podfile')).to be_truthy
......
require 'rails_helper' require 'rails_helper'
describe Gitlab::DependencyLinker::PodspecJsonLinker, lib: true do describe Gitlab::DependencyLinker::PodspecJsonLinker do
describe '.support?' do describe '.support?' do
it 'supports *.podspec.json' do it 'supports *.podspec.json' do
expect(described_class.support?('Reachability.podspec.json')).to be_truthy expect(described_class.support?('Reachability.podspec.json')).to be_truthy
......
require 'rails_helper' require 'rails_helper'
describe Gitlab::DependencyLinker::PodspecLinker, lib: true do describe Gitlab::DependencyLinker::PodspecLinker do
describe '.support?' do describe '.support?' do
it 'supports *.podspec' do it 'supports *.podspec' do
expect(described_class.support?('Reachability.podspec')).to be_truthy expect(described_class.support?('Reachability.podspec')).to be_truthy
......
require 'rails_helper' require 'rails_helper'
describe Gitlab::DependencyLinker::RequirementsTxtLinker, lib: true do describe Gitlab::DependencyLinker::RequirementsTxtLinker do
describe '.support?' do describe '.support?' do
it 'supports requirements.txt' do it 'supports requirements.txt' do
expect(described_class.support?('requirements.txt')).to be_truthy expect(described_class.support?('requirements.txt')).to be_truthy
......
require 'rails_helper' require 'rails_helper'
describe Gitlab::DependencyLinker, lib: true do describe Gitlab::DependencyLinker do
describe '.link' do describe '.link' do
it 'links using GemfileLinker' do it 'links using GemfileLinker' do
blob_name = 'Gemfile' blob_name = 'Gemfile'
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::Diff::DiffRefs, lib: true do describe Gitlab::Diff::DiffRefs do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
describe '#compare_in' do describe '#compare_in' do
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::Diff::File, lib: true do describe Gitlab::Diff::File do
include RepoHelpers include RepoHelpers
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::Diff::Highlight, lib: true do describe Gitlab::Diff::Highlight do
include RepoHelpers include RepoHelpers
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::Diff::InlineDiffMarkdownMarker, lib: true do describe Gitlab::Diff::InlineDiffMarkdownMarker do
describe '#mark' do describe '#mark' do
let(:raw) { "abc 'def'" } let(:raw) { "abc 'def'" }
let(:inline_diffs) { [2..5] } let(:inline_diffs) { [2..5] }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment