diff options
author | w0rp <devw0rp@gmail.com> | 2017-11-28 09:47:04 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-11-28 09:48:35 +0000 |
commit | 4e821e64c7292ba635e55c409a015023d7549374 (patch) | |
tree | 3fb657e555ce622d41bfd1e111af60e624b2103e /test/command_callback/test_ruby_command_callback.vader | |
parent | bba6b4c23ccf556656aac6d12c25c21713179209 (diff) | |
download | ale-4e821e64c7292ba635e55c409a015023d7549374.zip |
Fix #1168 - Make the ruby linter executable configurable
Diffstat (limited to 'test/command_callback/test_ruby_command_callback.vader')
-rw-r--r-- | test/command_callback/test_ruby_command_callback.vader | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/command_callback/test_ruby_command_callback.vader b/test/command_callback/test_ruby_command_callback.vader new file mode 100644 index 00000000..3813d56b --- /dev/null +++ b/test/command_callback/test_ruby_command_callback.vader @@ -0,0 +1,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('')) |