diff options
author | w0rp <devw0rp@gmail.com> | 2017-05-05 10:14:46 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-05-05 10:14:52 +0100 |
commit | d1cc1de6a58d485a87cb44998de1a05256893528 (patch) | |
tree | 353d8c31671fdfe0c760daf8f0f1ae1359539cd3 /test | |
parent | ba7999dae093c2c9b9f924c9bff8fb9fdea167fc (diff) | |
download | ale-d1cc1de6a58d485a87cb44998de1a05256893528.zip |
Allow the Brakeman tests to be run directly
Diffstat (limited to 'test')
-rw-r--r-- | test/handler/test_brakeman_handler.vader | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/handler/test_brakeman_handler.vader b/test/handler/test_brakeman_handler.vader index 33db4d67..bc7182e3 100644 --- a/test/handler/test_brakeman_handler.vader +++ b/test/handler/test_brakeman_handler.vader @@ -1,13 +1,20 @@ Before: + " Switch to the test rails directory. + let b:path = getcwd() + silent! cd /testplugin/test/handler + cd ../ruby_fixtures/valid_rails_app/app/models + runtime ale_linters/ruby/brakeman.vim call setbufvar(0, 'ruby_brakeman_rails_root_cached', '') - After: + " Switch back to whatever directory it was that we started on. + silent! 'cd ' . fnameescape(b:path) + unlet! b:path + call ale#linter#Reset() Execute(The brakeman handler should parse JSON correctly): - cd! /testplugin/test/ruby_fixtures/valid_rails_app/app/models silent file! thing.rb AssertEqual |