All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
2 call ale#assert#SetUpLinterTest('ruby', 'rails_best_practices')
3 call ale#test#SetFilename('../test-files/ruby/valid_rails_app/db/test.rb')
5 let b:args = '--silent -f json'
6 \ . ' --output-file ' . (has('win32') ? '%t' : '/dev/stdout')
7 let b:app_path = ale#path#Simplify(g:dir . '/../test-files/ruby/valid_rails_app')
8 let b:suffix = has('win32') ? '; type %t' : ''
14 call ale#assert#TearDownLinterTest()
16 Execute(Executable should default to rails_best_practices):
17 AssertLinter 'rails_best_practices', ale#Escape('rails_best_practices')
19 \ . ' ' . ale#Escape(b:app_path)
22 Execute(Should be able to set a custom executable):
23 let g:ale_ruby_rails_best_practices_executable = 'bin/rails_best_practices'
25 AssertLinter 'bin/rails_best_practices', ale#Escape('bin/rails_best_practices')
27 \ . ' ' . ale#Escape(b:app_path)
30 Execute(Setting bundle appends 'exec rails_best_practices'):
31 let g:ale_ruby_rails_best_practices_executable = 'path to/bundle'
33 AssertLinter 'path to/bundle', ale#Escape('path to/bundle')
34 \ . ' exec rails_best_practices'
36 \ . ' ' . ale#Escape(b:app_path)
39 Execute(Command callback should be empty when not in a valid Rails app):
40 call ale#test#SetFilename('../test-files/ruby/not_a_rails_app/test.rb')
42 AssertLinter 'rails_best_practices', ''