044c762c85
Solargraph allows to set configuration options by creating a .solargraph.yml file at the root of the project using it. Therfore this file is a good canditate for finding ruby projects root paths. Initial discussion: https://github.com/w0rp/ale/issues/1874#issuecomment-418316168
37 lines
1.4 KiB
Plaintext
37 lines
1.4 KiB
Plaintext
" Author: Horacio Sanson <https://github.com/hsanson>
|
|
" Description: Tests for solargraph lsp linter.
|
|
|
|
Before:
|
|
call ale#assert#SetUpLinterTest('ruby', 'solargraph')
|
|
|
|
After:
|
|
call ale#assert#TearDownLinterTest()
|
|
|
|
Execute(should set solargraph for rails app):
|
|
call ale#test#SetFilename('../ruby_fixtures/valid_rails_app/app/models/thing.rb')
|
|
AssertLSPLanguage 'ruby'
|
|
AssertLSPOptions {}
|
|
AssertLSPProject ale#path#Simplify(g:dir . 'command_callback/../ruby_fixtures/valid_rails_app')
|
|
AssertLSPAddress '127.0.0.1:7658'
|
|
|
|
Execute(should set solargraph for ruby app1):
|
|
call ale#test#SetFilename('../ruby_fixtures/valid_ruby_app1/lib/file.rb')
|
|
AssertLSPLanguage 'ruby'
|
|
AssertLSPOptions {}
|
|
AssertLSPProject ale#path#Simplify(g:dir . 'command_callback/../ruby_fixtures/valid_ruby_app1')
|
|
AssertLSPAddress '127.0.0.1:7658'
|
|
|
|
Execute(should set solargraph for ruby app2):
|
|
call ale#test#SetFilename('../ruby_fixtures/valid_ruby_app2/lib/file.rb')
|
|
AssertLSPLanguage 'ruby'
|
|
AssertLSPOptions {}
|
|
AssertLSPProject ale#path#Simplify(g:dir . 'command_callback/../ruby_fixtures/valid_ruby_app2')
|
|
AssertLSPAddress '127.0.0.1:7658'
|
|
|
|
Execute(should set solargraph for ruby app3):
|
|
call ale#test#SetFilename('../ruby_fixtures/valid_ruby_app3/lib/file.rb')
|
|
AssertLSPLanguage 'ruby'
|
|
AssertLSPOptions {}
|
|
AssertLSPProject ale#path#Simplify(g:dir . 'command_callback/../ruby_fixtures/valid_ruby_app3')
|
|
AssertLSPAddress '127.0.0.1:7658'
|