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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubocop/cop/api/grape_api_instance_spec.rb')
-rw-r--r--spec/rubocop/cop/api/grape_api_instance_spec.rb29
1 files changed, 0 insertions, 29 deletions
diff --git a/spec/rubocop/cop/api/grape_api_instance_spec.rb b/spec/rubocop/cop/api/grape_api_instance_spec.rb
deleted file mode 100644
index 74f175cb707..00000000000
--- a/spec/rubocop/cop/api/grape_api_instance_spec.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-require 'fast_spec_helper'
-require 'rubocop'
-require_relative '../../../../rubocop/cop/api/grape_api_instance'
-
-RSpec.describe RuboCop::Cop::API::GrapeAPIInstance do
- include CopHelper
-
- subject(:cop) { described_class.new }
-
- it 'adds an offense when inheriting from Grape::API' do
- inspect_source(<<~CODE)
- class SomeAPI < Grape::API
- end
- CODE
-
- expect(cop.offenses.size).to eq(1)
- end
-
- it 'does not add an offense when inheriting from Grape::API::Instance' do
- inspect_source(<<~CODE)
- class SomeAPI < Grape::API::Instance
- end
- CODE
-
- expect(cop.offenses.size).to be_zero
- end
-end