diff --git a/lib/solargraph/convention.rb b/lib/solargraph/convention.rb index db0faa7cb..056d4013d 100644 --- a/lib/solargraph/convention.rb +++ b/lib/solargraph/convention.rb @@ -9,7 +9,6 @@ module Solargraph module Convention autoload :Base, 'solargraph/convention/base' autoload :Gemfile, 'solargraph/convention/gemfile' - autoload :Rspec, 'solargraph/convention/rspec' autoload :Gemspec, 'solargraph/convention/gemspec' autoload :Rakefile, 'solargraph/convention/rakefile' @@ -43,7 +42,6 @@ def self.for_global(yard_map) register Gemfile register Gemspec - register Rspec register Rakefile end end diff --git a/lib/solargraph/convention/rspec.rb b/lib/solargraph/convention/rspec.rb deleted file mode 100644 index 426e541a7..000000000 --- a/lib/solargraph/convention/rspec.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -module Solargraph - module Convention - class Rspec < Base - def local source_map - return EMPTY_ENVIRON unless File.basename(source_map.filename) =~ /_spec\.rb$/ - @environ ||= Environ.new( - requires: ['rspec'], - domains: ['RSpec::Matchers', 'RSpec::ExpectationGroups'], - pins: [ - # This override is necessary due to an erroneous @return tag in - # rspec's YARD documentation. - # @todo The return types have been fixed (https://github.com/rspec/rspec-expectations/pull/1121) - Solargraph::Pin::Reference::Override.method_return('RSpec::Matchers#expect', 'RSpec::Expectations::ExpectationTarget') - ].concat(extras) - ) - end - - private - - def extras - @@extras ||= SourceMap.load_string(%( - def describe(*args); end - def it(*args); end - )).pins - end - end - end -end