FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
vim-ruby/spec/spec_helper.rb at vim8.2 · vim-ruby/vim-ruby · GitHub
vim-ruby
/
vim-ruby
Public
Notifications
You must be signed in to change notification settings
Fork
285
Star
2k
Code
Issues
57
Pull requests
6
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
vim-ruby
/
spec
/
spec_helper.rb
Copy path
More file actions
More file actions
Latest commit
History
History
History
40 lines (30 loc) · 944 Bytes
Breadcrumbs
vim-ruby
/
spec
/
spec_helper.rb
Copy path
File metadata and controls
40 lines (30 loc) · 944 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
require
'vimrunner'
require
'vimrunner/rspec'
Vimrunner
::
RSpec
.
configure
do
|
config
|
config
.
reuse_server
=
true
config
.
start_vim
do
vim
=
Vimrunner
.
start_gvim
vim
.
prepend_runtimepath
(
File
.
expand_path
(
'../..'
,
__FILE__
)
)
vim
.
add_plugin
(
File
.
expand_path
(
'../vim'
,
__FILE__
)
,
'plugin/syntax_test.vim'
)
vim
.
set
'expandtab'
vim
.
set
'shiftwidth'
,
2
vim
end
def
assert_correct_indenting
(
extension
=
'rb'
,
string
)
filename
=
"test.
#{
extension
}
"
IO
.
write
filename
,
string
vim
.
edit
filename
vim
.
normal
'gg=G'
vim
.
write
expect
(
IO
.
read
(
filename
)
)
.
to
eq
string
end
def
assert_correct_highlighting
(
extension
=
'rb'
,
string
,
patterns
,
group
)
filename
=
"test.
#{
extension
}
"
IO
.
write
filename
,
string
vim
.
edit
filename
Array
(
patterns
)
.
each
do
|
pattern
|
# TODO: add a custom matcher
expect
(
vim
.
echo
(
"TestSyntax('
#{
pattern
}
', '
#{
group
}
')"
)
)
.
to
eq
'1'
end
end
end
Back
|
FazBrowse Home
|
New Git URL