Permalink
Browse files

Add RSpec snippets

  • Loading branch information...
1 parent d699be1 commit 347cc132dbaefbbb10be58f76226353f6aed2008 aereal committed Mar 5, 2012
Showing with 35 additions and 0 deletions.
  1. +35 −0 .vim/snippets/rspec.snip
View
@@ -0,0 +1,35 @@
+snippet describe
+ describe ${1:object} do
+ ${2}
+ end
+
+snippet it
+ it "${1:description}" do
+ ${2}
+ end
+
+snippet specify
+ specify "${1:description}" do
+ ${2}
+ end
+
+snippet context
+ context "${1:case}" do
+ ${2}
+ end
+
+snippet expect
+ expect { ${1:subject} }.${2:to} \
+ ${3}
+
+snippet change change ... from ... by ...
+ change { ${1:object} }.from(${2:pre}).to(${3:post})
+
+snippet change change ... by
+ change { ${1:object} }.by(${2:pre})
+
+snippet let
+ let(:${1:name}) { ${2} }
+
+snippet let!
+ let!(:${1:name}) { ${2} }

0 comments on commit 347cc13

Please sign in to comment.