Allow the Brakeman tests to be run directly

This commit is contained in:
w0rp 2017-05-05 10:14:46 +01:00
parent ba7999dae0
commit d1cc1de6a5
1 changed files with 9 additions and 2 deletions

View File

@ -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