summaryrefslogtreecommitdiff
path: root/test/command_callback/test_cucumber_command_callback.vader
blob: d09a5712acbed9cef6d0cb4664933b6cdf6f99fc (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
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(''))