diff options
author | w0rp <w0rp@users.noreply.github.com> | 2018-04-21 09:23:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-21 09:23:07 +0100 |
commit | 20241c87ef9f033e2ac2f44f5bb99af358ab44b2 (patch) | |
tree | 537bc0e0174af27d4ab415708b24ae437a86ebf1 /test/command_callback | |
parent | 63bbb38c0ce9237b17acbfc29f192a0656c62677 (diff) | |
parent | 1e6651e0a0039185d63ebe4f26f04937e82207fb (diff) | |
download | ale-20241c87ef9f033e2ac2f44f5bb99af358ab44b2.zip |
Merge pull request #1511 from elebow/add-cucumber-checker
Add `cucumber` checker for Cucumber files
Diffstat (limited to 'test/command_callback')
-rw-r--r-- | test/command_callback/test_cucumber_command_callback.vader | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/command_callback/test_cucumber_command_callback.vader b/test/command_callback/test_cucumber_command_callback.vader new file mode 100644 index 00000000..d09a5712 --- /dev/null +++ b/test/command_callback/test_cucumber_command_callback.vader @@ -0,0 +1,25 @@ +Before: + runtime ale_linters/ruby/rubocop.vim + call ale#test#SetDirectory('/testplugin/test/') + +After: + Restore + + call ale#linter#Reset() + call ale#test#RestoreDirectory() + +Execute(Should require the nearest features dir, if one is found): + 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('')) + +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('')) |