Skip to content

Instantly share code, notes, and snippets.

View cczona's full-sized avatar

Carina C. Zona cczona

View GitHub Profile
@cczona
cczona / technical_interviewing.md
Last active December 11, 2015 21:59 — forked from econchick/interview_tips.md
Technical Interviewing Guide Resources and tips collected from January 28, 2013 Women Who Code workshop
@cczona
cczona / .irbrc
Created January 28, 2013 05:16 — forked from zzak/.irbrc
# Custom prompt. Based on <https://gist.github.com/4652812> by Zachary Scott
IRB.conf[:PROMPT][:PERSONAL] = IRB.conf[:PROMPT][:RVM].merge(
:PROMPT_I => "\n#{RUBY_VERSION} >> ",
:PROMPT_S => "%l >> ",
:PROMPT_C => "? >> ",
:RETURN => "RETURNS> %s\n\n"
)
IRB.conf[:PROMPT_MODE] = :PERSONAL
@cczona
cczona / rspec_rails_cheetsheet.rb
Created December 19, 2012 16:19 — forked from them0nk/rspec_rails_cheetsheet.rb
#rspec #rails #testing
#Model
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
#Rendering
response.should render_template(:index)
#Redirecting
response.should redirect_to(movies_path)
#Model
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
@user.errors[:email].should include("is invalid") # check for the error format message
#Rendering
response.should render_template(:index)
#Redirecting

Capybara Cheat Sheet

Navigating

  visit('/projects')
  visit(comments_path)
  visit(post_comments_path(post))