diff options
author | Eddie Lebow <elebow@users.noreply.github.com> | 2018-04-17 00:29:13 -0400 |
---|---|---|
committer | Eddie Lebow <elebow@users.noreply.github.com> | 2018-04-20 22:54:29 -0400 |
commit | 1e6651e0a0039185d63ebe4f26f04937e82207fb (patch) | |
tree | 03eb2190fb4eed1c7a2cfc73cc7080e885fc963f /test/handler/test_cucumber_handler.vader | |
parent | fb720251bf38139c1811665852e1bc2f73d0393f (diff) | |
download | ale-1e6651e0a0039185d63ebe4f26f04937e82207fb.zip |
Add cucumber checker for cucumber files
For now, it only detects undefined steps. The nearest `features` dir
above the buffer file is loaded, so step definitions should be found
correctly.
Tested only with Cucumber for Ruby, but it should work for any cucumber
that follows a substantially similar directory structure.
Diffstat (limited to 'test/handler/test_cucumber_handler.vader')
-rw-r--r-- | test/handler/test_cucumber_handler.vader | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/handler/test_cucumber_handler.vader b/test/handler/test_cucumber_handler.vader new file mode 100644 index 00000000..2b69a784 --- /dev/null +++ b/test/handler/test_cucumber_handler.vader @@ -0,0 +1,18 @@ +Before: + runtime ale_linters/cucumber/cucumber.vim + +After: + call ale#linter#Reset() + +Execute(The cucumber handler parses JSON correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 13, + \ 'code': 'E', + \ 'text': 'Undefined step' + \ } + \ ], + \ ale_linters#cucumber#cucumber#Handle(bufnr(''), [ + \ '[{"elements": [{"steps": [{"result": {"status": "undefined"},"match": {"location": "features/cuke.feature:13"},"line": 13,"name": "Something undefined","keyword": "Given "},{"result": {"status": "skipped"},"match": {"location": "/var/lib/gems/2.3.0/gems/cucumber-3.1.0/lib/cucumber/step_match.rb:103"},"line": 14,"name": "I visit the profile page for Alice","keyword": "When "}],"type": "scenario","line": 12,"description": "","name": "Another scenario","keyword": "Scenario","id": "a-user-can-view-another-users-profile;another-scenario"}],"line": 1,"description": "","name": "A user can view another users profile","keyword": "Feature","id": "a-user-can-view-another-users-profile","uri": "features/cuke.feature"}]' + \ ]) |