diff options
author | w0rp <devw0rp@gmail.com> | 2018-07-15 18:24:53 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-07-15 18:28:28 +0100 |
commit | a42999a639b2916b769a85f37d037be314d9d61b (patch) | |
tree | 5ebfb4d357dc673efa93fd32a66b489c4510de40 /test/command_callback/test_cucumber_command_callback.vader | |
parent | 5155a35a80fe3b20659eb0f28cc6cc720532dd3f (diff) | |
download | ale-a42999a639b2916b769a85f37d037be314d9d61b.zip |
Massively reduce the amount of code needed for linter tests
Diffstat (limited to 'test/command_callback/test_cucumber_command_callback.vader')
-rw-r--r-- | test/command_callback/test_cucumber_command_callback.vader | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/test/command_callback/test_cucumber_command_callback.vader b/test/command_callback/test_cucumber_command_callback.vader index d09a5712..7a8457fc 100644 --- a/test/command_callback/test_cucumber_command_callback.vader +++ b/test/command_callback/test_cucumber_command_callback.vader @@ -1,25 +1,18 @@ Before: - runtime ale_linters/ruby/rubocop.vim - call ale#test#SetDirectory('/testplugin/test/') + call ale#assert#SetUpLinterTest('cucumber', 'cucumber') After: - Restore - - call ale#linter#Reset() - call ale#test#RestoreDirectory() + call ale#assert#TearDownLinterTest() Execute(Should require the nearest features dir, if one is found): - call ale#test#SetFilename('cucumber_fixtures/features/cuke.feature') + call ale#test#SetFilename('../cucumber_fixtures/features/cuke.feature') - AssertEqual - \ 'cucumber --dry-run --quiet --strict --format=json ' - \ . '-r ' . ale#Escape(ale#path#Simplify(g:dir . '/cucumber_fixtures/features/')) . ' %t', - \ ale_linters#cucumber#cucumber#GetCommand(bufnr('')) + AssertLinter 'cucumber', + \ 'cucumber --dry-run --quiet --strict --format=json ' + \ . '-r ' . ale#Escape(ale#path#Simplify(g:dir . '/../cucumber_fixtures/features/')) . ' %t' Execute(Should require nothing if no features dir is found): call ale#test#SetFilename('something/without/a/features/dir') - AssertEqual - \ 'cucumber --dry-run --quiet --strict --format=json ' - \ . ' %t', - \ ale_linters#cucumber#cucumber#GetCommand(bufnr('')) + AssertLinter 'cucumber', + \ 'cucumber --dry-run --quiet --strict --format=json %t' |