]> git.madduck.net Git - etc/vim.git/blob - test/linter/test_ruby_steep.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

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.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / test / linter / test_ruby_steep.vader
1 " Author: Loic Nageleisen <https://github.com/lloeki>
2 " Description: Tests for steep linter.
3 Before:
4   call ale#assert#SetUpLinterTest('ruby', 'steep')
5
6   let g:ale_ruby_steep_executable = 'steep'
7
8 After:
9   call ale#assert#TearDownLinterTest()
10
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')
14   \   . ' check '
15   \   . ' dummy.rb'
16
17 Execute(Should be able to set a custom executable):
18   let g:ale_ruby_steep_executable = 'bin/steep'
19
20   call ale#test#SetFilename('../test-files/ruby/nested/foo/dummy.rb')
21   AssertLinter 'bin/steep' , ale#Escape('bin/steep')
22   \   . ' check '
23   \   . ' dummy.rb'
24
25 Execute(Setting bundle appends 'exec steep'):
26   let g:ale_ruby_steep_executable = 'path to/bundle'
27
28   call ale#test#SetFilename('../test-files/ruby/nested/foo/dummy.rb')
29   AssertLinter 'path to/bundle', ale#Escape('path to/bundle')
30   \   . ' exec steep'
31   \   . ' check '
32   \   . ' dummy.rb'
33
34 Execute(should accept options):
35   let g:ale_ruby_steep_options = '--severity-level=hint'
36
37   call ale#test#SetFilename('../test-files/ruby/nested/foo/dummy.rb')
38   AssertLinter 'steep', ale#Escape('steep')
39   \   . ' check'
40   \   . ' --severity-level=hint'
41   \   . ' dummy.rb'
42
43 Execute(Should not lint files out of steep root):
44   call ale#test#SetFilename('../test-files/ruby/nested/dummy.rb')
45   AssertLinter 'steep', ''
46
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')
50   \   . ' check '
51   \   . ' dummy.rb'
52
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')
56   \   . ' check '
57   \   . ' one' . (has('win32') ? '\' : '/') . 'dummy.rb'
58
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')
62   \   . ' check '
63   \   . ' dummy.rb'
64
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')
68   \   . ' check '
69   \   . ' three' . (has('win32') ? '\' : '/') . 'dummy.rb'