summaryrefslogtreecommitdiff
path: root/test/fixers
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-08-10 14:57:30 +0100
committerw0rp <devw0rp@gmail.com>2017-08-10 14:57:30 +0100
commit34aa3437e0fc062215020b423bdf57da449e9400 (patch)
tree2897d39ad66cd6ee60ff81352103c1e118127fa5 /test/fixers
parent0c26e8945cc662fb41ad3b2a808516a4501d1e07 (diff)
downloadale-34aa3437e0fc062215020b423bdf57da449e9400.zip
Pass extra rubocop options in the middle instead, and fix the Vader test so it can be run multiple times in Vim
Diffstat (limited to 'test/fixers')
-rw-r--r--test/fixers/test_rubocop_fixer_callback.vader9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/fixers/test_rubocop_fixer_callback.vader b/test/fixers/test_rubocop_fixer_callback.vader
index e9a87395..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 ..
@@ -21,7 +23,7 @@ Execute(The rubocop callback should return the correct default values):
\ {
\ 'read_temporary_file': 1,
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
- \ . ' --auto-correct %t ',
+ \ . ' --auto-correct %t',
\ },
\ ale#fixers#rubocop#Fix(bufnr(''))
@@ -33,7 +35,7 @@ Execute(The rubocop callback should include configuration files):
\ 'read_temporary_file': 1,
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
\ . ' --config ' . ale#Escape(g:dir . '/ruby_paths/with_config/.rubocop.yml')
- \ . ' --auto-correct %t ',
+ \ . ' --auto-correct %t',
\ },
\ ale#fixers#rubocop#Fix(bufnr(''))
@@ -46,6 +48,7 @@ Execute(The rubocop callback should include custom rubocop options):
\ 'read_temporary_file': 1,
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
\ . ' --config ' . ale#Escape(g:dir . '/ruby_paths/with_config/.rubocop.yml')
- \ . ' --auto-correct %t --except Lint/Debugger',
+ \ . ' --except Lint/Debugger'
+ \ . ' --auto-correct %t',
\ },
\ ale#fixers#rubocop#Fix(bufnr(''))