iftheshoefritz / solargraph-rails

Solargraph plugin to add awareness of Rails-specific code
MIT License
322 stars 30 forks source link

Assertions missing from LSP suggestion #71

Open twnaing opened 1 month ago

twnaing commented 1 month ago

Some of the assertions from the Rails guides' available assertions are missing from LSP suggestion.

methods work/not
assert not
assert_not not
assert_equal work
assert_not_equal not
assert_same work
assert_not_equal not
assert_same work
assert_not_same not
assert_nil work
assert_not_nil not
assert_empty work
assert_not_empty not
assert_match work
assert_no_match not
assert_includes work
assert_not_includes not
assert_in_delta work
assert_not_in_delta not
assert_in_epsilon work
assert_not_in_epsilon not
assert_throws work
assert_raises work
assert_instance_of work
assert_not_instance_of not
assert_kind_of work
assert_not_kind_of not
assert_respond_to work
assert_not_respond_to not
assert_operator work
assert_not_operator not
assert_predicate not
assert_not_predicate not
flunk not

All the Rails specific assertions are also missing from LSP suggestions. They are from ActiveSupport::Testing::Assertions, ActionDispatch::Assertions::ResponseAssertions and ActionDispatch::Assertions::RoutingAssertions.

methods work/not
assert_difference not
assert_no_difference not
assert_changes not
assert_no_changes not
assert_nothing_raised not
assert_recognizes not
assert_generates not
assert_response not
assert_redirected_to not

How can I configure Solargraph (with solargraph-rails) or use !@parse to see all the assertions in Rails testing guide?

Other info

---
include:
  - "**/*.rb"
exclude:
  - spec/**/*
  - test/**/*
  - vendor/**/*
  - ".bundle/**/*"
require:
  - actioncable
  - actionmailer
  - actionpack
  - actionview
  - activejob
  - activemodel
  - activerecord
  - activestorage
  - activesupport
  - faker
domains: []
reporters:
  - rubocop
formatter:
  rubocop:
    cops: safe
    except: []
    only: []
    extra_args: []
require_paths: []
plugins:
  - solargraph-rails
max_files: 5000
twnaing commented 1 month ago

adding minitest-rails gem and require 'minitest/rails' in test_herlper.rb includes some methods (but not all).