summaryrefslogtreecommitdiff
path: root/test/command_callback/test_reek_command_callback.vader
blob: 059e5e3609db04bbb10eb92dc838e11110e0c9fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Before:
  call ale#assert#SetUpLinterTest('ruby', 'reek')

After:
  call ale#assert#TearDownLinterTest()

Execute(The reek callbacks should return the correct default values):
  WithChainResults ['reek 5.0.0']
  AssertLinter 'reek', [
  \ 'reek --version',
  \ 'reek -f json --no-progress --no-color --stdin-filename %s',
  \]

  " Try with older versions.
  call ale#semver#ResetVersionCache()

  WithChainResults ['reek 4.8.2']
  AssertLinter 'reek', [
  \ 'reek --version',
  \ 'reek -f json --no-progress --no-color',
  \]

Execute(The reek version check should be cached):
  WithChainResults ['reek 5.0.0']
  AssertLinter 'reek', [
  \ 'reek --version',
  \ 'reek -f json --no-progress --no-color --stdin-filename %s',
  \]

  WithChainResults []
  AssertLinter 'reek', [
  \ '',
  \ 'reek -f json --no-progress --no-color --stdin-filename %s',
  \]