summaryrefslogtreecommitdiff
path: root/test/fixers
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-07-06 22:58:14 +0100
committerw0rp <devw0rp@gmail.com>2017-07-06 22:58:14 +0100
commit854066e8499344a6461fef8fd0ee4b3f8eaebeeb (patch)
tree5fa7c99247494296f22ac963471e37307df5be16 /test/fixers
parentb43413916d0f215fb7a38c53784b3e68360d914a (diff)
downloadale-854066e8499344a6461fef8fd0ee4b3f8eaebeeb.zip
#732 - Use the configuration files when fixing files with rubocop
Diffstat (limited to 'test/fixers')
-rw-r--r--test/fixers/test_rubocop_fixer_callback.vader22
1 files changed, 18 insertions, 4 deletions
diff --git a/test/fixers/test_rubocop_fixer_callback.vader b/test/fixers/test_rubocop_fixer_callback.vader
index e9352e73..74160c73 100644
--- a/test/fixers/test_rubocop_fixer_callback.vader
+++ b/test/fixers/test_rubocop_fixer_callback.vader
@@ -19,10 +19,24 @@ After:
unlet! g:dir
Execute(The rubocop callback should return the correct default values):
- silent execute 'file ' . fnameescape(g:dir . '/ruby_paths/dummy.rb')
+ call ale#test#SetFilename('ruby_paths/dummy.rb')
AssertEqual
- \ {'read_temporary_file': 1,
- \ 'command': "'" . g:ale_ruby_rubocop_executable . "' "
- \ . '--auto-correct %t' },
+ \ {
+ \ 'read_temporary_file': 1,
+ \ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
+ \ . ' --auto-correct %t',
+ \ },
+ \ ale#fixers#rubocop#Fix(bufnr(''))
+
+Execute(The rubocop callback should include configuration files):
+ 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')
+ \ . ' --auto-correct %t',
+ \ },
\ ale#fixers#rubocop#Fix(bufnr(''))