Skip to content

Instantly share code, notes, and snippets.

View ilunglee's full-sized avatar
🏠
Working from home

I-Lung Lee ilunglee

🏠
Working from home
View GitHub Profile
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do
@ilunglee
ilunglee / rspec_model_testing_template.rb
Created July 26, 2018 23:35 — forked from PWSdelta/rspec_model_testing_template.rb
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@ilunglee
ilunglee / .bash_profile
Last active July 16, 2020 22:51 — forked from masnun/.bash_profile
My Bash Profile
# Load Postgres current version
export PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH";
# Rbenv auto load when terminal loads
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
# Load .bashrc if it exist
if [ -f ~/.bashrc ]; then source ~/.bashrc; fi
# Load PHP current version