Skip to content

Instantly share code, notes, and snippets.

@jkeck
Created September 7, 2017 14:53
Show Gist options
  • Save jkeck/cfaa1607dd61dbf3f2a2e8b1039a38e8 to your computer and use it in GitHub Desktop.
Save jkeck/cfaa1607dd61dbf3f2a2e8b1039a38e8 to your computer and use it in GitHub Desktop.
'.source.ruby':
'initialize':
'prefix': 'init'
'body': """
def initialize($1)
$2
end$3
"""
'require':
'prefix': 'req'
'body': "require '$1'"
'Frozen String Literal':
'prefix': 'frozen'
'body': "# frozen_string_literal: true"
'RSpec Context':
'prefix': 'cont'
'body': """
context '$1' do
$2
end$3
"""
'RSpec Describe':
'prefix': 'desc'
'body': """
describe '$1' do
$2
end$3
"""
'RSpec Expect':
'prefix': 'exp'
'body': 'expect($1).to$2 '
'RSpec it':
'prefix': 'it'
'body': """
it '$1' do
$2
end$3
"""
'RSpec let':
'prefix': 'let'
'body': 'let(:$1) { $2 }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment