Commit 97a7293a authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '220018-rspec-zero-monkey-patching-mode-2' into 'master'

[RUN AS-IF-FOSS] RSpec zero monkey patching mode

See merge request gitlab-org/gitlab!35056
parents 55935e07 3e5db0cc
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::RepositoryUrlBuilder do
RSpec.describe Gitlab::RepositoryUrlBuilder do
describe '.build' do
using RSpec::Parameterized::TableSyntax
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::RequestContext, :request_store do
RSpec.describe Gitlab::RequestContext, :request_store do
subject { described_class.instance }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::RequestForgeryProtection, :allow_forgery_protection do
RSpec.describe Gitlab::RequestForgeryProtection, :allow_forgery_protection do
let(:csrf_token) { SecureRandom.base64(ActionController::RequestForgeryProtection::AUTHENTICITY_TOKEN_LENGTH) }
let(:env) do
{
......
......@@ -2,7 +2,7 @@
require 'fast_spec_helper'
describe Gitlab::RequestProfiler::Profile do
RSpec.describe Gitlab::RequestProfiler::Profile do
let(:profile) { described_class.new(filename) }
describe '.new' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::RequestProfiler do
RSpec.describe Gitlab::RequestProfiler do
describe '.profile_token' do
it 'returns a token' do
expect(described_class.profile_token).to be_present
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::RouteMap do
RSpec.describe Gitlab::RouteMap do
describe '#initialize' do
context 'when the data is not YAML' do
it 'raises an error' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Routing do
RSpec.describe Gitlab::Routing do
context 'when module is included' do
subject do
Class.new.include(described_class).new
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::RuggedInstrumentation, :request_store do
RSpec.describe Gitlab::RuggedInstrumentation, :request_store do
subject { described_class }
describe '.query_time' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Runtime do
RSpec.describe Gitlab::Runtime do
shared_examples "valid runtime" do |runtime, max_threads|
it "identifies itself" do
expect(subject.identify).to eq(runtime)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SafeRequestStore do
RSpec.describe Gitlab::SafeRequestStore do
describe '.store' do
context 'when RequestStore is active', :request_store do
it 'uses RequestStore' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Sanitizers::Exif do
RSpec.describe Gitlab::Sanitizers::Exif do
let(:sanitizer) { described_class.new }
describe '#batch_clean' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Sanitizers::SVG do
RSpec.describe Gitlab::Sanitizers::SVG do
let(:scrubber) { Gitlab::Sanitizers::SVG::Scrubber.new }
let(:namespace) { double(Nokogiri::XML::Namespace, prefix: 'xlink', href: 'http://www.w3.org/1999/xlink') }
let(:namespaced_attr) { double(Nokogiri::XML::Attr, name: 'href', namespace: namespace, value: '#awesome_id') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Search::FoundBlob do
RSpec.describe Gitlab::Search::FoundBlob do
let(:project) { create(:project, :public, :repository) }
describe 'parsing content results' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Search::FoundWikiPage do
RSpec.describe Gitlab::Search::FoundWikiPage do
let(:project) { create(:project, :public, :repository) }
describe 'policy' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Search::Query do
RSpec.describe Gitlab::Search::Query do
let(:query) { 'base filter:wow anotherfilter:noway name:maybe other:mmm leftover' }
let(:subject) do
described_class.new(query) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SearchContext::Builder, type: :controller do
RSpec.describe Gitlab::SearchContext::Builder, type: :controller do
controller(ApplicationController) { }
subject(:builder) { described_class.new(controller.view_context) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SearchContext::ControllerConcern, type: :controller do
RSpec.describe Gitlab::SearchContext::ControllerConcern, type: :controller do
controller(ApplicationController) do
include Gitlab::SearchContext::ControllerConcern
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SearchResults do
RSpec.describe Gitlab::SearchResults do
include ProjectForksHelper
include SearchHelpers
......
......@@ -2,7 +2,7 @@
require 'fast_spec_helper'
describe Gitlab::Serializer::Ci::Variables do
RSpec.describe Gitlab::Serializer::Ci::Variables do
subject do
described_class.load(described_class.dump(object))
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Serializer::Pagination do
RSpec.describe Gitlab::Serializer::Pagination do
let(:request) { double(url: "#{Gitlab.config.gitlab.url}:8080/api/v4/projects?#{query.to_query}", query_parameters: query) }
let(:response) { spy('response') }
let(:headers) { spy('headers') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Serverless::Service do
RSpec.describe Gitlab::Serverless::Service do
let(:cluster) { create(:cluster) }
let(:environment) { create(:environment) }
let(:attributes) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Session do
RSpec.describe Gitlab::Session do
it 'uses the current thread as a data store' do
Thread.current[:session_storage] = { a: :b }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::ShardHealthCache, :clean_gitlab_redis_cache do
RSpec.describe Gitlab::ShardHealthCache, :clean_gitlab_redis_cache do
let(:shards) { %w(foo bar) }
before do
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require 'stringio'
describe Gitlab::Shell do
RSpec.describe Gitlab::Shell do
let_it_be(:project) { create(:project, :repository) }
let(:repository) { project.repository }
let(:gitlab_shell) { described_class.new }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Sherlock::Collection do
RSpec.describe Gitlab::Sherlock::Collection do
let(:collection) { described_class.new }
let(:transaction) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Sherlock::FileSample do
RSpec.describe Gitlab::Sherlock::FileSample do
let(:sample) { described_class.new(__FILE__, [], 150.4, 2) }
describe '#id' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Sherlock::LineProfiler do
RSpec.describe Gitlab::Sherlock::LineProfiler do
let(:profiler) { described_class.new }
describe '#profile' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Sherlock::LineSample do
RSpec.describe Gitlab::Sherlock::LineSample do
let(:sample) { described_class.new(150.0, 4) }
describe '#duration' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Sherlock::Location do
RSpec.describe Gitlab::Sherlock::Location do
let(:location) { described_class.new(__FILE__, 1) }
describe 'from_ruby_location' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Sherlock::Middleware do
RSpec.describe Gitlab::Sherlock::Middleware do
let(:app) { double(:app) }
let(:middleware) { described_class.new(app) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Sherlock::Query do
RSpec.describe Gitlab::Sherlock::Query do
let(:started_at) { Time.utc(2015, 1, 1) }
let(:finished_at) { started_at + 5 }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Sherlock::Transaction do
RSpec.describe Gitlab::Sherlock::Transaction do
let(:transaction) { described_class.new('POST', '/cat_pictures') }
describe '#id' do
......
......@@ -3,7 +3,7 @@
require 'fast_spec_helper'
require 'rspec-parameterized'
describe Gitlab::SidekiqCluster::CLI do
RSpec.describe Gitlab::SidekiqCluster::CLI do
let(:cli) { described_class.new('/dev/null') }
let(:timeout) { described_class::DEFAULT_SOFT_TIMEOUT_SECONDS }
let(:default_options) do
......
......@@ -3,7 +3,7 @@
require 'fast_spec_helper'
require 'rspec-parameterized'
describe Gitlab::SidekiqCluster do
RSpec.describe Gitlab::SidekiqCluster do
describe '.trap_signals' do
it 'traps the given signals' do
expect(described_class).to receive(:trap).ordered.with(:INT)
......
......@@ -3,7 +3,7 @@
require 'fast_spec_helper'
require 'rspec-parameterized'
describe Gitlab::SidekiqConfig::CliMethods do
RSpec.describe Gitlab::SidekiqConfig::CliMethods do
let(:dummy_root) { '/tmp/' }
describe '.worker_queues' do
......
......@@ -2,7 +2,7 @@
require 'fast_spec_helper'
describe Gitlab::SidekiqConfig::Worker do
RSpec.describe Gitlab::SidekiqConfig::Worker do
def create_worker(queue:, **attributes)
namespace = queue.include?(':') && queue.split(':').first
inner_worker = double(
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqConfig do
RSpec.describe Gitlab::SidekiqConfig do
describe '.workers' do
it 'includes all workers' do
worker_classes = described_class.workers.map(&:klass)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqDaemon::MemoryKiller do
RSpec.describe Gitlab::SidekiqDaemon::MemoryKiller do
let(:memory_killer) { described_class.new }
let(:pid) { 12345 }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqDaemon::Monitor do
RSpec.describe Gitlab::SidekiqDaemon::Monitor do
let(:monitor) { described_class.new }
describe '#within_job' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqLogging::DeduplicationLogger do
RSpec.describe Gitlab::SidekiqLogging::DeduplicationLogger do
describe '#log_deduplication' do
let(:job) do
{
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqLogging::ExceptionHandler do
RSpec.describe Gitlab::SidekiqLogging::ExceptionHandler do
describe '#call' do
let(:job) do
{
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqLogging::JSONFormatter do
RSpec.describe Gitlab::SidekiqLogging::JSONFormatter do
let(:message) { 'This is a test' }
let(:now) { Time.now }
let(:timestamp) { now.utc.to_f }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqLogging::StructuredLogger do
RSpec.describe Gitlab::SidekiqLogging::StructuredLogger do
describe '#call' do
let(:timestamp) { Time.iso8601('2018-01-01T12:00:00.000Z') }
let(:created_at) { timestamp - 1.second }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqMiddleware::AdminMode::Client, :do_not_mock_admin_mode, :request_store do
RSpec.describe Gitlab::SidekiqMiddleware::AdminMode::Client, :do_not_mock_admin_mode, :request_store do
include AdminModeHelper
let(:worker) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqMiddleware::AdminMode::Server, :do_not_mock_admin_mode, :request_store do
RSpec.describe Gitlab::SidekiqMiddleware::AdminMode::Server, :do_not_mock_admin_mode, :request_store do
include AdminModeHelper
let(:worker) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqMiddleware::ClientMetrics do
RSpec.describe Gitlab::SidekiqMiddleware::ClientMetrics do
context "with worker attribution" do
subject { described_class.new }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqMiddleware::DuplicateJobs::Client, :clean_gitlab_redis_queues do
RSpec.describe Gitlab::SidekiqMiddleware::DuplicateJobs::Client, :clean_gitlab_redis_queues do
let(:worker_class) do
Class.new do
def self.name
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqMiddleware::DuplicateJobs::DuplicateJob, :clean_gitlab_redis_queues do
RSpec.describe Gitlab::SidekiqMiddleware::DuplicateJobs::DuplicateJob, :clean_gitlab_redis_queues do
using RSpec::Parameterized::TableSyntax
subject(:duplicate_job) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqMiddleware::DuplicateJobs::Server, :clean_gitlab_redis_queues do
RSpec.describe Gitlab::SidekiqMiddleware::DuplicateJobs::Server, :clean_gitlab_redis_queues do
let(:worker_class) do
Class.new do
def self.name
......
......@@ -3,7 +3,7 @@
require 'fast_spec_helper'
require 'timecop'
describe Gitlab::SidekiqMiddleware::DuplicateJobs::Strategies::UntilExecuting do
RSpec.describe Gitlab::SidekiqMiddleware::DuplicateJobs::Strategies::UntilExecuting do
let(:fake_duplicate_job) do
instance_double(Gitlab::SidekiqMiddleware::DuplicateJobs::DuplicateJob)
end
......
......@@ -2,7 +2,7 @@
require 'fast_spec_helper'
describe Gitlab::SidekiqMiddleware::DuplicateJobs::Strategies do
RSpec.describe Gitlab::SidekiqMiddleware::DuplicateJobs::Strategies do
describe '.for' do
it 'returns the right class for `until_executing`' do
expect(described_class.for(:until_executing)).to eq(described_class::UntilExecuting)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqMiddleware::ExtraDoneLogMetadata do
RSpec.describe Gitlab::SidekiqMiddleware::ExtraDoneLogMetadata do
# Cannot use Class.new for this as ApplicationWorker will need the class to
# have a name during `included do`.
let(:worker) { AdminEmailWorker.new }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqMiddleware::MemoryKiller do
RSpec.describe Gitlab::SidekiqMiddleware::MemoryKiller do
subject { described_class.new }
let(:pid) { 999 }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqMiddleware::Monitor do
RSpec.describe Gitlab::SidekiqMiddleware::Monitor do
let(:monitor) { described_class.new }
describe '#call' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqMiddleware::ServerMetrics do
RSpec.describe Gitlab::SidekiqMiddleware::ServerMetrics do
context "with worker attribution" do
subject { described_class.new }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqMiddleware::WorkerContext::Client do
RSpec.describe Gitlab::SidekiqMiddleware::WorkerContext::Client do
let(:worker_class) do
Class.new do
def self.name
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqMiddleware::WorkerContext::Server do
RSpec.describe Gitlab::SidekiqMiddleware::WorkerContext::Server do
let(:worker_class) do
Class.new do
def self.name
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require 'sidekiq/testing'
describe Gitlab::SidekiqMiddleware do
RSpec.describe Gitlab::SidekiqMiddleware do
before do
stub_const('TestWorker', Class.new)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqQueue, :clean_gitlab_redis_queues do
RSpec.describe Gitlab::SidekiqQueue, :clean_gitlab_redis_queues do
around do |example|
Sidekiq::Queue.new('authorized_projects').clear
Sidekiq::Testing.disable!(&example)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqSignals do
RSpec.describe Gitlab::SidekiqSignals do
describe '.install' do
let(:result) { Hash.new { |h, k| h[k] = 0 } }
let(:int_handler) { -> (_) { result['INT'] += 1 } }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqStatus::ClientMiddleware do
RSpec.describe Gitlab::SidekiqStatus::ClientMiddleware do
describe '#call' do
it 'tracks the job in Redis' do
expect(Gitlab::SidekiqStatus).to receive(:set).with('123', Gitlab::SidekiqStatus::DEFAULT_EXPIRATION)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqStatus::ServerMiddleware do
RSpec.describe Gitlab::SidekiqStatus::ServerMiddleware do
describe '#call' do
it 'stops tracking of a job upon completion' do
expect(Gitlab::SidekiqStatus).to receive(:unset).with('123')
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqStatus do
RSpec.describe Gitlab::SidekiqStatus do
describe '.set', :clean_gitlab_redis_shared_state do
it 'stores the job ID' do
described_class.set('123')
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqVersioning::Manager do
RSpec.describe Gitlab::SidekiqVersioning::Manager do
before do
Sidekiq::Manager.prepend described_class
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqVersioning, :redis do
RSpec.describe Gitlab::SidekiqVersioning, :redis do
let(:foo_worker) do
Class.new do
def self.name
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::ApplicationHelp do
RSpec.describe Gitlab::SlashCommands::ApplicationHelp do
let(:params) { { command: '/gitlab', text: 'help' } }
let(:project) { build(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Command do
RSpec.describe Gitlab::SlashCommands::Command do
let(:project) { create(:project, :repository) }
let(:user) { create(:user) }
let(:chat_name) { double(:chat_name, user: user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Deploy do
RSpec.describe Gitlab::SlashCommands::Deploy do
describe '#execute' do
let(:project) { create(:project, :repository) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::IssueClose do
RSpec.describe Gitlab::SlashCommands::IssueClose do
describe '#execute' do
let(:issue) { create(:issue, project: project) }
let(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::IssueComment do
RSpec.describe Gitlab::SlashCommands::IssueComment do
describe '#execute' do
let(:project) { create(:project, :public) }
let(:issue) { create(:issue, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::IssueMove, service: true do
RSpec.describe Gitlab::SlashCommands::IssueMove, service: true do
describe '#match' do
shared_examples_for 'move command' do |text_command|
it 'can be parsed to extract the needed fields' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::IssueNew do
RSpec.describe Gitlab::SlashCommands::IssueNew do
describe '#execute' do
let(:project) { create(:project) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::IssueSearch do
RSpec.describe Gitlab::SlashCommands::IssueSearch do
describe '#execute' do
let!(:issue) { create(:issue, project: project, title: 'find me') }
let!(:confidential) { create(:issue, :confidential, project: project, title: 'mepmep find') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::IssueShow do
RSpec.describe Gitlab::SlashCommands::IssueShow do
describe '#execute' do
let(:issue) { create(:issue, project: project) }
let(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Presenters::Access do
RSpec.describe Gitlab::SlashCommands::Presenters::Access do
shared_examples_for 'displays an error message' do
it do
expect(subject[:text]).to match(error_message)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Presenters::Deploy do
RSpec.describe Gitlab::SlashCommands::Presenters::Deploy do
let(:build) { create(:ci_build) }
describe '#present' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Presenters::Error do
RSpec.describe Gitlab::SlashCommands::Presenters::Error do
subject { described_class.new('Error').message }
it { is_expected.to be_a(Hash) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Presenters::IssueClose do
RSpec.describe Gitlab::SlashCommands::Presenters::IssueClose do
let(:project) { create(:project) }
let(:issue) { create(:issue, project: project) }
let(:attachment) { subject[:attachments].first }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Presenters::IssueComment do
RSpec.describe Gitlab::SlashCommands::Presenters::IssueComment do
let_it_be(:project) { create(:project) }
let_it_be(:issue) { create(:issue, project: project) }
let_it_be(:note) { create(:note, project: project, noteable: issue) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Presenters::IssueMove do
RSpec.describe Gitlab::SlashCommands::Presenters::IssueMove do
let_it_be(:admin) { create(:admin) }
let_it_be(:project, reload: true) { create(:project) }
let_it_be(:other_project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Presenters::IssueNew do
RSpec.describe Gitlab::SlashCommands::Presenters::IssueNew do
let(:project) { create(:project) }
let(:issue) { create(:issue, project: project) }
let(:attachment) { subject[:attachments].first }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Presenters::IssueSearch do
RSpec.describe Gitlab::SlashCommands::Presenters::IssueSearch do
let(:project) { create(:project) }
let(:message) { subject[:text] }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Presenters::IssueShow do
RSpec.describe Gitlab::SlashCommands::Presenters::IssueShow do
let(:user) { create(:user, :with_avatar) }
let(:project) { create(:project, creator: user) }
let(:issue) { create(:issue, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Presenters::Run do
RSpec.describe Gitlab::SlashCommands::Presenters::Run do
let(:presenter) { described_class.new }
describe '#present' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Run do
RSpec.describe Gitlab::SlashCommands::Run do
describe '.available?' do
it 'returns true when builds are enabled for the project' do
project = double(:project, builds_enabled?: true)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Slug::Environment do
RSpec.describe Gitlab::Slug::Environment do
describe '#generate' do
{
"staging-12345678901234567" => "staging-123456789-q517sa",
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SnippetSearchResults do
RSpec.describe Gitlab::SnippetSearchResults do
include SearchHelpers
let_it_be(:snippet) { create(:snippet, content: 'foo', file_name: 'foo') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Sourcegraph do
RSpec.describe Gitlab::Sourcegraph do
let_it_be(:user) { create(:user) }
let(:feature_scope) { true }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SQL::CTE do
RSpec.describe Gitlab::SQL::CTE do
describe '#to_arel' do
it 'generates an Arel relation for the CTE body' do
relation = User.where(id: 1)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SQL::Glob do
RSpec.describe Gitlab::SQL::Glob do
describe '.to_like' do
it 'matches * as %' do
expect(glob('apple', '*')).to be(true)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SQL::Pattern do
RSpec.describe Gitlab::SQL::Pattern do
describe '.to_pattern' do
subject(:to_pattern) { User.to_pattern(query) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SQL::RecursiveCTE do
RSpec.describe Gitlab::SQL::RecursiveCTE do
let(:cte) { described_class.new(:cte_name) }
describe '#to_arel' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SQL::Union do
RSpec.describe Gitlab::SQL::Union do
let(:relation_1) { User.where(email: 'alice@example.com').select(:id) }
let(:relation_2) { User.where(email: 'bob@example.com').select(:id) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SSHPublicKey, lib: true do
RSpec.describe Gitlab::SSHPublicKey, lib: true do
let(:key) { attributes_for(:rsa_key_2048)[:key] }
let(:public_key) { described_class.new(key) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::StaticSiteEditor::Config do
RSpec.describe Gitlab::StaticSiteEditor::Config do
subject(:config) { described_class.new(repository, ref, file_path, return_url) }
let_it_be(:namespace) { create(:namespace, name: 'namespace') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::StringPlaceholderReplacer do
RSpec.describe Gitlab::StringPlaceholderReplacer do
describe '.render_url' do
it 'returns the nil if the string is blank' do
expect(described_class.replace_string_placeholders(nil, /whatever/)).to be_blank
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::StringRangeMarker do
RSpec.describe Gitlab::StringRangeMarker do
describe '#mark' do
def mark_diff(rich = nil)
raw = 'abc <def>'
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::StringRegexMarker do
RSpec.describe Gitlab::StringRegexMarker do
describe '#mark' do
context 'with a single occurrence' do
let(:raw) { %{"name": "AFNetworking"} }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SubmoduleLinks do
RSpec.describe Gitlab::SubmoduleLinks do
let(:submodule_item) { double(id: 'hash', path: 'gitlab-foss') }
let(:repo) { double }
let(:links) { described_class.new(repo) }
......
......@@ -2,7 +2,7 @@
require 'fast_spec_helper'
describe Gitlab::TabWidth, lib: true do
RSpec.describe Gitlab::TabWidth, lib: true do
describe '.css_class_for_user' do
it 'returns default CSS class when user is nil' do
css_class = described_class.css_class_for_user(nil)
......
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.
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