summaryrefslogtreecommitdiff
path: root/test/command_callback/test_ruby_solargraph.vader
blob: b9dd46d8028ec611cb359ac6848e1d414eec28d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
" 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'