Skip to content

Instantly share code, notes, and snippets.

@eriktrom
Forked from fayimora/test.coffee
Last active December 17, 2015 18:19
Show Gist options
  • Save eriktrom/5652157 to your computer and use it in GitHub Desktop.
Save eriktrom/5652157 to your computer and use it in GitHub Desktop.

Revisions

  1. eriktrom revised this gist May 26, 2013. 1 changed file with 3 additions and 17 deletions.
    20 changes: 3 additions & 17 deletions test.coffee
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,6 @@
    "use strict"

    beforeEach ->
    Ember.run(App, App.advanceReadiness);
    Ember.testing = true

    afterEach ->
    @@ -11,19 +10,6 @@ afterEach ->
    describe "App.ApplicationController", ->
    it "is an ember controller", ->
    # Ember.run(assert.ok(Ember.Controller.detect(App.ApplicationController)))
    appCont = App.ApplicationController.create({container: App.__container_, content: ''})
    expect(appCont).to.be.an('object')

    describe "It has an IndexRoute", ->
    it "has an IndexRoute", ->
    Ember.run ->
    m = App.Man.create()
    assert.equal(m.get('fullName'), 'Fayimora')

    describe "Give it some context", ->
    describe "maybe a bit more context here", ->
    it "should run here few assertions", ->
    expect([]).to.be.an "array"

    it "should assert these", ->
    assert.equal 1 + 1, 2
    Em.run ->
    appCont = App.ApplicationController.create({container: App.__container_, content: ['']})
    expect(appCont).to.be.an('object')
  2. @fayimora fayimora created this gist May 26, 2013.
    29 changes: 29 additions & 0 deletions test.coffee
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    "use strict"

    beforeEach ->
    Ember.run(App, App.advanceReadiness);
    Ember.testing = true

    afterEach ->
    App.reset()


    describe "App.ApplicationController", ->
    it "is an ember controller", ->
    # Ember.run(assert.ok(Ember.Controller.detect(App.ApplicationController)))
    appCont = App.ApplicationController.create({container: App.__container_, content: ''})
    expect(appCont).to.be.an('object')

    describe "It has an IndexRoute", ->
    it "has an IndexRoute", ->
    Ember.run ->
    m = App.Man.create()
    assert.equal(m.get('fullName'), 'Fayimora')

    describe "Give it some context", ->
    describe "maybe a bit more context here", ->
    it "should run here few assertions", ->
    expect([]).to.be.an "array"

    it "should assert these", ->
    assert.equal 1 + 1, 2