Skip to content

Instantly share code, notes, and snippets.

View jasongonzales23's full-sized avatar

Jason jasongonzales23

  • DevZero
  • San Francisco, CA
View GitHub Profile
" Make Vim more useful
set nocompatible
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
git log —decorate —oneline from..to
@jasongonzales23
jasongonzales23 / gist:6613397
Created September 18, 2013 18:30
Promises in Ember JS
App.SomeRoute = Ember.Route.extend
model: ->
@.store.find('some_data')
setupController: (controller, model) ->
@.controllerFor('some.index').set('model', model)
@jasongonzales23
jasongonzales23 / GSP_tests.md
Created August 2, 2012 20:27
Testing GSP's with GroovyPagesTestCase

Overview

  • About Me
  • These are Integration Tests
  • How I Think About Tests
  • Anatomy of a Test
  • Assertions
  • Passing Models
  • Running the Test
@jasongonzales23
jasongonzales23 / GSP_tests.markdown
Created August 2, 2012 19:44
Testing GSP's with GroovyPagesTestCase

Overview

*Unit vs. Integration Tests *Why and When to Test? *Anatomy of a Test *Assertions *Passing Models

Here's what an integration test looks like

@jasongonzales23
jasongonzales23 / GSP_tests.markdown
Created August 2, 2012 19:39
Testing GSP's with GroovyPagesTestCase

Here's what it looks like

/* RC_LEGAL_LEGEND */

import grails.test.GroovyPagesTestCase

class ReceiptAttacherTest extends GroovyPagesTestCase {

def lineItemModelService

@jasongonzales23
jasongonzales23 / GSP_tests.markdown
Created August 2, 2012 19:37
Testing GSP's with GroovyPagesTestCase

Here's what it looks like

import grails.test.GroovyPagesTestCase class ReceiptAttacherTest extends GroovyPagesTestCase { def lineItemModelService def receiptService void testAttachReceiptFromCreateOrItemizeModal_AttachmentShouldOpenInNewWindow() { //given def file = new File("grails-app/views/receipt/_drawerReceipt.gsp")

@jasongonzales23
jasongonzales23 / GSP_tests.markdown
Created August 2, 2012 19:36
Testing GSP's with GroovyPagesTestCase

Here's what it looks like

import grails.test.GroovyPagesTestCase class ReceiptAttacherTest extends GroovyPagesTestCase { def lineItemModelService def receiptService void testAttachReceiptFromCreateOrItemizeModal_AttachmentShouldOpenInNewWindow() { //given ` def file = new File("grails-app/views/receipt/_drawerReceipt.gsp")

@jasongonzales23
jasongonzales23 / GSP_tests.markdown
Created August 2, 2012 19:36
Testing GSP's with GroovyPagesTestCase

Here's what it looks like

import grails.test.GroovyPagesTestCase class ReceiptAttacherTest extends GroovyPagesTestCase { def lineItemModelService def receiptService void testAttachReceiptFromCreateOrItemizeModal_AttachmentShouldOpenInNewWindow() { //given def file = new File("grails-app/views/receipt/_drawerReceipt.gsp")

@jasongonzales23
jasongonzales23 / GSP_tests.markdown
Created August 2, 2012 19:35
Testing GSP's with GroovyPagesTestCase

Here's what it looks like

`import grails.test.GroovyPagesTestCase class ReceiptAttacherTest extends GroovyPagesTestCase { def lineItemModelService def receiptService void testAttachReceiptFromCreateOrItemizeModal_AttachmentShouldOpenInNewWindow() { //given def file = new File("grails-app/views/receipt/_drawerReceipt.gsp")