Skip to content

Instantly share code, notes, and snippets.

@seankibler
seankibler / snippets.snippets
Last active September 25, 2015 08:17
A Vim snippet (snipMate) for rspec-given
snippet giv
Given(:${4:condition}) { ${5:condition} }
When(:${2:result}) { ${3:result} }
Then { ${1:assertion} }
def stat_values(values)
vs = values.map { |v| "['#{h v[0]}', #{v[1]}]" }
"[#{vs.join(',')}]"
end
@seankibler
seankibler / find_create_with.sh
Created August 19, 2014 14:05
Find methods matching create_with in Rails app gems
for gem in $(bundle exec gem list | awk '{ print $1 }'); do
grep -R --color 'create_with' $(bundle show $gem)
done