Skip to content

Commit 83345ba

Browse files
author
Bruno Sutic
committed
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
1 parent dec4556 commit 83345ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

snippets/ruby.snippets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ snippet tctss
957957
# Rspec snippets #
958958
##########################
959959
snippet desc
960-
describe ${1:class_name} do
960+
describe ${1:`substitute(substitute(vim_snippets#Filename(), '_spec$', '', ''), '\(_\|^\)\(.\)', '\u\2', 'g')`} do
961961
${0}
962962
end
963963
snippet descm

0 commit comments

Comments
 (0)