From d1cc1de6a58d485a87cb44998de1a05256893528 Mon Sep 17 00:00:00 2001 From: w0rp Date: Fri, 5 May 2017 10:14:46 +0100 Subject: Allow the Brakeman tests to be run directly --- test/handler/test_brakeman_handler.vader | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'test/handler') 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 -- cgit v1.2.3