-
Notifications
You must be signed in to change notification settings - Fork 0
/
snippets
100 lines (97 loc) · 2.22 KB
/
snippets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
snippet note
# NOTE: (`strftime("%Y-%m-%d")`) `system("whoami | tr -d '\n'")` => ${1}
snippet fixme
# FIXME: (`strftime("%Y-%m-%d")`) `system("whoami | tr -d '\n'")` => ${1}
snippet todo
# TODO: (`strftime("%Y-%m-%d")`) `system("whoami | tr -d '\n'")` => ${1}
snippet pryp
binding.pry${1}
snippet bye
require 'byebug'; byebug${1}
#cucumber
snippet sc
Scenario: ${1:title}
${2}
snippet sco
Scenario Outline: ${1:eating}
Given ${2: there are <start> cucumbers}
When ${3: I eat <eat> cucumbers}
Then ${4: I should have <left> cucumbers}
Examples:
| ${5:start} | ${6:eat} | ${7:left} |
| ${8:12} | ${9:5} | ${10:7} |
| ${11}
snippet sce
Scenario: ${1:title}
Given ${2:context}
When ${3:event}
Then ${4:outcome}
${5}
snippet fea
Feature: ${1:Title}
In order to ${2:value/benefit}
As a ${3:role}
I want ${4:feature}
${5}
snippet mafk
add_foreign_key :${1:table_name}, :${0:plural_association_name}
snippet macc
add_column :${1:table_name}, :${2:column_name}, :${3:data_type}
macc${4}
snippet mycol
t.${1:type} :${2:column_name}
mycol${3}
snippet mytab
create_table :${1:table_name} do |t|
t.${1:type} :${2:column_name}
mycol${4}
end
snippet mydrp
drop_table :${1:table_name}
snippet errors
errors.add(:base, "${1:Error text}")
snippet letb
let(:${1:object}) { build(:${2:object}) }
${3}
snippet letc
let(:${1:object}) { create(:${2:object}) }
${3}
snippet cre
create(:${1:object})
snippet build
build(:${1:object})
${2}
snippet bs
build_stubbed(:${1:object})
${2}
snippet assigns
assigns[:${1:instance_variable}]${2}
${3}
snippet allow
allow(${1:object}).to ${0}
snippet expect
expect(${1:object}).to ${0}
snippet receive
receive(:${1:object})${0}
snippet eq
eq(${1:value})${0}
snippet mydesc
describe "${1:class_name}" do
${2}
end
snippet lt
link_to "${1:Text}", ${2:Object}
snippet csl
console.log("${1:Description}", ${2});
snippet rp
= render partial: '${1:partial_name}', locals: {${2:key}: ${3:value}}${4}
snippet sop
save_and_open_page
snippet rbcop
# rubocop:disable Metrics/LineLength,
snippet rbcop
# rubocop:disable Metrics/MethodLength
snippet rbcop
# rubocop:disable Metrics/CyclomaticComplexity
snippet rbcop
# rubocop:disable Metrics/PerceivedComplexity