summaryrefslogtreecommitdiff
path: root/test/command_callback/test_ruby_command_callback.vader
blob: 3813d56b8ea94d96886e97c5a5ec1d14c2f197a5 (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
Before:
  Save g:ale_ruby_ruby_executable

  unlet! g:ale_ruby_ruby_executable

  runtime ale_linters/ruby/ruby.vim

After:
  Restore

  call ale#linter#Reset()

Execute(The default command should be correct):
  AssertEqual 'ruby', ale_linters#ruby#ruby#GetExecutable(bufnr(''))
  AssertEqual
  \ ale#Escape('ruby') . ' -w -c -T1 %t',
  \ ale_linters#ruby#ruby#GetCommand(bufnr(''))

Execute(The executable should be configurable):
  let g:ale_ruby_ruby_executable = 'foobar'

  AssertEqual 'foobar', ale_linters#ruby#ruby#GetExecutable(bufnr(''))
  AssertEqual
  \ ale#Escape('foobar') . ' -w -c -T1 %t',
  \ ale_linters#ruby#ruby#GetCommand(bufnr(''))