diff options
Diffstat (limited to 'test/fixers/test_rubocop_fixer_callback.vader')
-rw-r--r-- | test/fixers/test_rubocop_fixer_callback.vader | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/fixers/test_rubocop_fixer_callback.vader b/test/fixers/test_rubocop_fixer_callback.vader index e3383537..87d56d07 100644 --- a/test/fixers/test_rubocop_fixer_callback.vader +++ b/test/fixers/test_rubocop_fixer_callback.vader @@ -1,8 +1,10 @@ Before: Save g:ale_ruby_rubocop_executable + Save g:ale_ruby_rubocop_options " Use an invalid global executable, so we don't match it. let g:ale_ruby_rubocop_executable = 'xxxinvalid' + let g:ale_ruby_rubocop_options = '' call ale#test#SetDirectory('/testplugin/test/fixers') silent cd .. @@ -36,3 +38,17 @@ Execute(The rubocop callback should include configuration files): \ . ' --auto-correct %t', \ }, \ ale#fixers#rubocop#Fix(bufnr('')) + +Execute(The rubocop callback should include custom rubocop options): + let g:ale_ruby_rubocop_options = '--except Lint/Debugger' + call ale#test#SetFilename('ruby_paths/with_config/dummy.rb') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_ruby_rubocop_executable) + \ . ' --config ' . ale#Escape(g:dir . '/ruby_paths/with_config/.rubocop.yml') + \ . ' --except Lint/Debugger' + \ . ' --auto-correct %t', + \ }, + \ ale#fixers#rubocop#Fix(bufnr('')) |