mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-21 00:58:34 +08:00
#3633 - Put all dummy test files in test/test-files
This commit is contained in:
@@ -17,7 +17,7 @@ After:
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The rubocop callback should return the correct default values):
|
||||
call ale#test#SetFilename('ruby_paths/dummy.rb')
|
||||
call ale#test#SetFilename('../test-files/ruby/dummy.rb')
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
@@ -28,26 +28,26 @@ Execute(The rubocop callback should return the correct default values):
|
||||
\ ale#fixers#rubocop#Fix(bufnr(''))
|
||||
|
||||
Execute(The rubocop callback should include configuration files):
|
||||
call ale#test#SetFilename('ruby_paths/with_config/dummy.rb')
|
||||
call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
|
||||
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
|
||||
\ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/ruby_paths/with_config/.rubocop.yml'))
|
||||
\ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ruby/with_config/.rubocop.yml'))
|
||||
\ . ' --auto-correct --force-exclusion --stdin %s',
|
||||
\ },
|
||||
\ 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')
|
||||
call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
|
||||
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
|
||||
\ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/ruby_paths/with_config/.rubocop.yml'))
|
||||
\ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ruby/with_config/.rubocop.yml'))
|
||||
\ . ' --except Lint/Debugger'
|
||||
\ . ' --auto-correct --force-exclusion --stdin %s',
|
||||
\ },
|
||||
@@ -55,13 +55,13 @@ Execute(The rubocop callback should include custom rubocop options):
|
||||
|
||||
Execute(The rubocop callback should use auto-correct-all option when set):
|
||||
let g:ale_ruby_rubocop_auto_correct_all = 1
|
||||
call ale#test#SetFilename('ruby_paths/with_config/dummy.rb')
|
||||
call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
|
||||
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
|
||||
\ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/ruby_paths/with_config/.rubocop.yml'))
|
||||
\ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ruby/with_config/.rubocop.yml'))
|
||||
\ . ' --auto-correct-all --force-exclusion --stdin %s'
|
||||
\ },
|
||||
\ ale#fixers#rubocop#Fix(bufnr(''))
|
||||
|
||||
Reference in New Issue
Block a user