Skip to content

Instantly share code, notes, and snippets.

View plusjade's full-sized avatar
🐵
🚀 🤖

Jade Dominguez plusjade

🐵
🚀 🤖
View GitHub Profile
<form action="/friends" method="POST">
<input type="text" name="lastname">
<button type="submit">Submit</button>
</form>
Started GET "/api/v2/searches/autocomplete_term?source=web&warehouse_id=5&zone_id=9" for ::1 at 2015-03-16 13:54:41 -0700
Processing by Api::V2::SearchesController#autocomplete_term as JSON
Parameters: {"source"=>"web", "warehouse_id"=>"5", "zone_id"=>"9"}
@plusjade
plusjade / jasmine-this-vars.md
Created December 19, 2015 21:54 — forked from traviskaufman/jasmine-this-vars.md
Better Jasmine Tests With `this`

Better Jasmine Tests With this

On the Refinery29 Mobile Web Team, codenamed "Bicycle", all of our unit tests are written using Jasmine, an awesome BDD library written by Pivotal Labs. We recently switched how we set up data for tests from declaring and assigning to closures, to assigning properties to each test case's this object, and we've seen some awesome benefits from doing such.

The old way

Up until recently, a typical unit test for us looked something like this:

describe('views.Card', function() {