Skip to content

Instantly share code, notes, and snippets.

Capybara

save_and_open_page

Matchers

have_button(locator)
@jwoodlee
jwoodlee / Vim Tricks
Last active December 18, 2015 06:59
Vim Tricks
:w !sudo tee % - saves a file as sudo (password prompted) if you forgot to open with sudo in the first place
@jwoodlee
jwoodlee / Clearing Session
Created September 29, 2012 21:18
Clearing Session in Rails
rm -R tmp/*
if active record
http://thinkingrails.blogspot.com/2007/06/rails-rake-tasks-reference.html
rake db:sessions:clear
@jwoodlee
jwoodlee / Jquery Tips
Created February 19, 2012 13:35
Jquery Tips
Binding a parametrized a non anonymous function to a button in jquery
Say you have the function
function buildDialog( parentId ){
alert(parentId);
return false;
}
And the following link <a href="5" class="attach">Do Something</a>
You can bind it to a like like