summaryrefslogtreecommitdiff
path: root/test/command_callback/test_brakeman_command_callback.vader
blob: 262f865e46a1b4a7f0c596c03b64157d4c655a2a (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
26
Before:
    runtime ale_linters/ruby/brakeman.vim

After:
    call ale#linter#Reset()

Execute(The brakeman command callback should detect absence of a valid Rails app):
    cd /testplugin/test/ruby_fixtures/not_a_rails_app/
    AssertEqual
    \   '',
    \   ale_linters#ruby#brakeman#GetCommand(bufnr(''))

Execute(The brakeman command callback should find a valid Rails app root):
    cd /testplugin/test/ruby_fixtures/valid_rails_app/db/
    AssertEqual
    \   'brakeman -f json -q  -p /testplugin/test/ruby_fixtures/valid_rails_app',
    \   ale_linters#ruby#brakeman#GetCommand(bufnr(''))

Execute(The brakeman command callback should include configured options):
    cd /testplugin/test/ruby_fixtures/valid_rails_app/db/
    let g:ale_ruby_brakeman_options = '--combobulate'


    AssertEqual
    \   'brakeman -f json -q --combobulate -p /testplugin/test/ruby_fixtures/valid_rails_app',
    \   ale_linters#ruby#brakeman#GetCommand(bufnr(''))