2018-07-01 05:21:59 -04:00
|
|
|
Before:
|
2018-07-15 13:24:53 -04:00
|
|
|
call ale#assert#SetUpLinterTest('ruby', 'reek')
|
2018-07-01 05:21:59 -04:00
|
|
|
|
|
|
|
After:
|
2018-07-15 13:24:53 -04:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2018-07-01 05:21:59 -04:00
|
|
|
|
|
|
|
Execute(The reek callbacks should return the correct default values):
|
2018-07-15 13:24:53 -04:00
|
|
|
WithChainResults ['reek 5.0.0']
|
|
|
|
AssertLinter 'reek', [
|
2018-07-01 05:21:59 -04:00
|
|
|
\ 'reek --version',
|
|
|
|
\ 'reek -f json --no-progress --no-color --stdin-filename %s',
|
2018-07-15 13:24:53 -04:00
|
|
|
\]
|
2018-07-01 05:21:59 -04:00
|
|
|
|
|
|
|
" Try with older versions.
|
|
|
|
call ale#semver#ResetVersionCache()
|
2018-07-15 13:24:53 -04:00
|
|
|
|
|
|
|
WithChainResults ['reek 4.8.2']
|
|
|
|
AssertLinter 'reek', [
|
|
|
|
\ 'reek --version',
|
2018-07-01 05:21:59 -04:00
|
|
|
\ 'reek -f json --no-progress --no-color',
|
2018-07-15 13:24:53 -04:00
|
|
|
\]
|
2018-07-01 05:21:59 -04:00
|
|
|
|
|
|
|
Execute(The reek version check should be cached):
|
2018-07-15 13:24:53 -04:00
|
|
|
WithChainResults ['reek 5.0.0']
|
|
|
|
AssertLinter 'reek', [
|
|
|
|
\ 'reek --version',
|
2018-07-01 05:21:59 -04:00
|
|
|
\ 'reek -f json --no-progress --no-color --stdin-filename %s',
|
2018-07-15 13:24:53 -04:00
|
|
|
\]
|
2018-07-01 05:21:59 -04:00
|
|
|
|
2018-07-15 13:24:53 -04:00
|
|
|
WithChainResults []
|
|
|
|
AssertLinter 'reek', [
|
2018-07-01 05:21:59 -04:00
|
|
|
\ '',
|
|
|
|
\ 'reek -f json --no-progress --no-color --stdin-filename %s',
|
2018-07-15 13:24:53 -04:00
|
|
|
\]
|