summaryrefslogtreecommitdiff
path: root/test/command_callback/test_reek_command_callback.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/command_callback/test_reek_command_callback.vader')
-rw-r--r--test/command_callback/test_reek_command_callback.vader34
1 files changed, 17 insertions, 17 deletions
diff --git a/test/command_callback/test_reek_command_callback.vader b/test/command_callback/test_reek_command_callback.vader
index 41e749c1..059e5e36 100644
--- a/test/command_callback/test_reek_command_callback.vader
+++ b/test/command_callback/test_reek_command_callback.vader
@@ -1,34 +1,34 @@
Before:
- runtime ale_linters/ruby/reek.vim
- call ale#test#SetDirectory('/testplugin/test/command_callback')
+ call ale#assert#SetUpLinterTest('ruby', 'reek')
After:
- call ale#test#RestoreDirectory()
- call ale#linter#Reset()
- call ale#semver#ResetVersionCache()
+ call ale#assert#TearDownLinterTest()
Execute(The reek callbacks should return the correct default values):
- AssertEqual
+ WithChainResults ['reek 5.0.0']
+ AssertLinter 'reek', [
\ '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
+
+ WithChainResults ['reek 4.8.2']
+ AssertLinter 'reek', [
+ \ 'reek --version',
\ '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
+ WithChainResults ['reek 5.0.0']
+ AssertLinter 'reek', [
+ \ 'reek --version',
\ 'reek -f json --no-progress --no-color --stdin-filename %s',
- \ ale_linters#ruby#reek#GetCommand(bufnr(''), ['reek 5.0.0'])
+ \]
- AssertEqual
+ WithChainResults []
+ AssertLinter 'reek', [
\ '',
- \ ale_linters#ruby#reek#VersionCheck(bufnr(''))
- AssertEqual
\ 'reek -f json --no-progress --no-color --stdin-filename %s',
- \ ale_linters#ruby#reek#GetCommand(bufnr(''), [])
+ \]