summaryrefslogtreecommitdiff
path: root/test/command_callback/test_brakeman_command_callback.vader
diff options
context:
space:
mode:
authorEddie Lebow <elebow@users.noreply.github.com>2017-05-05 05:05:53 -0400
committerw0rp <w0rp@users.noreply.github.com>2017-05-05 10:05:53 +0100
commitba7999dae093c2c9b9f924c9bff8fb9fdea167fc (patch)
tree59655bdc243e1c0bc7ccb2c47153b07aad5b4192 /test/command_callback/test_brakeman_command_callback.vader
parent14f3fc777fc4a5e1fd1e1a7b75f4edf84b0a9af0 (diff)
downloadale-ba7999dae093c2c9b9f924c9bff8fb9fdea167fc.zip
[RFC] Add Brakeman for Ruby on Rails (references #385) (#509)
* Add brakeman for Ruby on Rails
Diffstat (limited to 'test/command_callback/test_brakeman_command_callback.vader')
-rw-r--r--test/command_callback/test_brakeman_command_callback.vader26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/command_callback/test_brakeman_command_callback.vader b/test/command_callback/test_brakeman_command_callback.vader
new file mode 100644
index 00000000..262f865e
--- /dev/null
+++ b/test/command_callback/test_brakeman_command_callback.vader
@@ -0,0 +1,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(''))