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('eruby', 'erubi')
5 call ale#assert#TearDownLinterTest()
7 Execute(Executable should not contain any filter code by default):
8 call ale#test#SetFilename('../test-files/ruby/not_a_rails_app/file.rb')
10 AssertLinter 'ruby', [
11 \ 'ruby -r erubi/capture_end -e ' . ale#Escape('""'),
12 \ 'ruby -r erubi/capture_end -e ' . ale#Escape('puts Erubi::CaptureEndEngine.new($stdin.read).src') . '< %t | ruby -c',
15 Execute(Executable should filter invalid eRuby when inside a Rails project):
16 call ale#test#SetFilename('../test-files/ruby/valid_rails_app/app/views/my_great_view.html.erb')
18 AssertLinter 'ruby', [
19 \ 'ruby -r erubi/capture_end -e ' . ale#Escape('""'),
20 \ 'ruby -r erubi/capture_end -e ' . ale#Escape('puts Erubi::CaptureEndEngine.new($stdin.read.gsub(%{<%=},%{<%}), nil, %{-}).src') . '< %t | ruby -c',
23 Execute(Command should be blank if the first command in the chain returns output):
25 \ "/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- erubi/capture_end (LoadError)",
26 \ " from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'",
29 AssertLinter 'ruby', [
30 \ 'ruby -r erubi/capture_end -e ' . ale#Escape('""'),