This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/command_callback/test_reek_command_callback.vader

35 lines
1.1 KiB
Text
Raw Normal View History

Before:
runtime ale_linters/ruby/reek.vim
call ale#test#SetDirectory('/testplugin/test/command_callback')
After:
call ale#test#RestoreDirectory()
call ale#linter#Reset()
call ale#semver#ResetVersionCache()
Execute(The reek callbacks should return the correct default values):
AssertEqual
\ 'reek --version',
\ ale_linters#ruby#reek#VersionCheck(bufnr(''))
AssertEqual
\ 'reek -f json --no-progress --no-color --stdin-filename %s',
\ ale_linters#ruby#reek#GetCommand(bufnr(''), ['reek 5.0.0'])
" Try with older versions.
call ale#semver#ResetVersionCache()
AssertEqual
\ 'reek -f json --no-progress --no-color',
\ ale_linters#ruby#reek#GetCommand(bufnr(''), ['reek 4.8.2'])
Execute(The reek version check should be cached):
AssertEqual
\ 'reek -f json --no-progress --no-color --stdin-filename %s',
\ ale_linters#ruby#reek#GetCommand(bufnr(''), ['reek 5.0.0'])
AssertEqual
\ '',
\ ale_linters#ruby#reek#VersionCheck(bufnr(''))
AssertEqual
\ 'reek -f json --no-progress --no-color --stdin-filename %s',
\ ale_linters#ruby#reek#GetCommand(bufnr(''), [])