Created
March 8, 2011 19:05
-
-
Save nordringrayhide/860799 to your computer and use it in GitHub Desktop.
Some Ruby on Rails 3.x, RSpec, Shoulda snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rails 3.x | |
snippet vale | |
validate ${1:method_name} | |
snippet vals | |
validates ${1:column} | |
snippet valsp | |
validates ${1:column}, :presence => ${$1:true} | |
# RSpec 2.x | |
snippet desc | |
desribe "${1:subject}" do | |
${2} | |
end | |
snippet be | |
before(:each) { ${1} } | |
snippet ae | |
after(:each) { ${1} } | |
snippet it | |
it { ${1} } | |
snippet spec | |
specify { ${1} } | |
# Shoulda | |
snippet sd | |
should ${1} | |
snippet svpo | |
should validate_presence_of ${1:column} | |
snippet srws | |
should repond_with :success | |
snippet srer | |
should respond_with :redirect | |
snippet srt | |
should render_template :${1:name} | |
snippet srto | |
should redirect_to ${1:path} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment