Skip to content

Instantly share code, notes, and snippets.

@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@hjdivad
hjdivad / jasmine-bug-ember-object-printer.js
Last active December 15, 2015 20:49
Work around jasmine bug when failed expectation is on an Ember object
var originalEmitObject = jasmine.StringPrettyPrinter.prototype.emitObject,
originalHtmlReporterParameters = jasmine.HtmlReporter.parameters;
jasmine.StringPrettyPrinter.prototype.emitObject = function( object ) {
if( Ember.Object.detectInstance( object )){
this.append( object.toString() );
} else {
originalEmitObject.apply( this, arguments );
}
};
@machty
machty / new-router-examples.md
Last active April 16, 2020 22:03
How to do cool stuff with the new Router API