Improve ruby desc
snippet
Instead of dummy text, first argument for `describe` becomes a class name derived from a file name. Example: file: some_class_spec.rb describe argument: SomeClass
This commit is contained in:
parent
dec4556898
commit
83345ba694
@ -957,7 +957,7 @@ snippet tctss
|
|||||||
# Rspec snippets #
|
# Rspec snippets #
|
||||||
##########################
|
##########################
|
||||||
snippet desc
|
snippet desc
|
||||||
describe ${1:class_name} do
|
describe ${1:`substitute(substitute(vim_snippets#Filename(), '_spec$', '', ''), '\(_\|^\)\(.\)', '\u\2', 'g')`} do
|
||||||
${0}
|
${0}
|
||||||
end
|
end
|
||||||
snippet descm
|
snippet descm
|
||||||
|
Loading…
Reference in New Issue
Block a user