Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertions missing from LSP suggestion #71

Open
twnaing opened this issue Sep 13, 2024 · 1 comment
Open

Assertions missing from LSP suggestion #71

twnaing opened this issue Sep 13, 2024 · 1 comment

Comments

@twnaing
Copy link

twnaing commented Sep 13, 2024

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

  • ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux]
  • solargraph 0.50.0
  • solargraph-rails 1.1.0
  • .solargraph.yml config
---
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
Copy link
Author

twnaing commented Sep 14, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant