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.
1 " Author: Loic Nageleisen <https://github.com/lloeki>
2 " Description: Tests for steep linter.
4 call ale#assert#SetUpLinterTest('ruby', 'steep')
6 let g:ale_ruby_steep_executable = 'steep'
9 call ale#assert#TearDownLinterTest()
11 Execute(Executable should default to steep):
12 call ale#test#SetFilename('../test-files/ruby/nested/foo/dummy.rb')
13 AssertLinter 'steep', ale#Escape('steep')
17 Execute(Should be able to set a custom executable):
18 let g:ale_ruby_steep_executable = 'bin/steep'
20 call ale#test#SetFilename('../test-files/ruby/nested/foo/dummy.rb')
21 AssertLinter 'bin/steep' , ale#Escape('bin/steep')
25 Execute(Setting bundle appends 'exec steep'):
26 let g:ale_ruby_steep_executable = 'path to/bundle'
28 call ale#test#SetFilename('../test-files/ruby/nested/foo/dummy.rb')
29 AssertLinter 'path to/bundle', ale#Escape('path to/bundle')
34 Execute(should accept options):
35 let g:ale_ruby_steep_options = '--severity-level=hint'
37 call ale#test#SetFilename('../test-files/ruby/nested/foo/dummy.rb')
38 AssertLinter 'steep', ale#Escape('steep')
40 \ . ' --severity-level=hint'
43 Execute(Should not lint files out of steep root):
44 call ale#test#SetFilename('../test-files/ruby/nested/dummy.rb')
45 AssertLinter 'steep', ''
47 Execute(Should lint files at top steep root):
48 call ale#test#SetFilename('../test-files/ruby/nested/foo/dummy.rb')
49 AssertLinter 'steep', ale#Escape('steep')
53 Execute(Should lint files below top steep root):
54 call ale#test#SetFilename('../test-files/ruby/nested/foo/one/dummy.rb')
55 AssertLinter 'steep', ale#Escape('steep')
57 \ . ' one' . (has('win32') ? '\' : '/') . 'dummy.rb'
59 Execute(Should lint files at nested steep root):
60 call ale#test#SetFilename('../test-files/ruby/nested/foo/two/dummy.rb')
61 AssertLinter 'steep', ale#Escape('steep')
65 Execute(Should lint files below nested steep root):
66 call ale#test#SetFilename('../test-files/ruby/nested/foo/two/three/dummy.rb')
67 AssertLinter 'steep', ale#Escape('steep')
69 \ . ' three' . (has('win32') ? '\' : '/') . 'dummy.rb'