diff options
-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 |