All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 " Author: Horacio Sanson <https://github.com/hsanson>
2 " Description: Tests for solargraph lsp linter.
4 call ale#assert#SetUpLinterTest('ruby', 'solargraph')
7 call ale#assert#TearDownLinterTest()
9 Execute(command callback should return default string):
10 AssertLinter 'solargraph', ale#Escape('solargraph') . ' stdio'
12 Execute(command callback executable can be overridden):
13 let g:ale_ruby_solargraph_executable = 'foobar'
14 AssertLinter 'foobar', ale#Escape('foobar') . ' stdio'
16 Execute(should set solargraph for rails app):
17 call ale#test#SetFilename('../test-files/ruby/valid_rails_app/app/models/thing.rb')
18 AssertLSPLanguage 'ruby'
20 AssertLSPProject ale#test#GetFilename('../test-files/ruby/valid_rails_app')
22 Execute(should set solargraph for ruby app1):
23 call ale#test#SetFilename('../test-files/ruby/valid_ruby_app1/lib/file.rb')
24 AssertLSPLanguage 'ruby'
26 AssertLSPProject ale#test#GetFilename('../test-files/ruby/valid_ruby_app1')
28 Execute(should set solargraph for ruby app2):
29 call ale#test#SetFilename('../test-files/ruby/valid_ruby_app2/lib/file.rb')
30 AssertLSPLanguage 'ruby'
32 AssertLSPProject ale#test#GetFilename('../test-files/ruby/valid_ruby_app2')
34 Execute(should set solargraph for ruby app3):
35 call ale#test#SetFilename('../test-files/ruby/valid_ruby_app3/lib/file.rb')
36 AssertLSPLanguage 'ruby'
38 AssertLSPProject ale#test#GetFilename('../test-files/ruby/valid_ruby_app3')
40 Execute(should accept initialization options):
42 let b:ale_ruby_solargraph_options = { 'diagnostics': 'true' }
43 AssertLSPOptions { 'diagnostics': 'true' }