Skip to content

Commit

Permalink
Add some RSpec snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
Mange committed Mar 23, 2012
1 parent 00c3a2f commit e8552af
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions vim/UltiSnips/ruby.snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#
# RSpec
#
snippet spec "new spec file" b
# encoding: UTF-8
require 'spec_helper'

desc${0}
endsnippet

snippet desc "describe" b
describe ${1} do
${0}
end
endsnippet

snippet it "it does something" b
it "${1:does something}" do
${0}
end
endsnippet

snippet be "before each" b
before(:each) { ${1} }
${0}
endsnippet

snippet bee "before each do" b
before(:each) do
${1}
end
${0}
endsnippet

snippet cont "context" b
context "${1}" do
${0}
end
endsnippet

snippet let "let" b
let(:${1:variable}) { ${2} }
${0}
endsnippet

snippet shr "should_receive" w
should_receive(:${1})${0}
endsnippet

0 comments on commit e8552af

Please sign in to comment.