Skip to content

Instantly share code, notes, and snippets.

@oliverbarnes
Forked from anonymous/test_and_error.coffee
Last active December 22, 2015 11:29
Show Gist options
  • Save oliverbarnes/6466099 to your computer and use it in GitHub Desktop.
Save oliverbarnes/6466099 to your computer and use it in GitHub Desktop.
Initial integration test to make sure I have basic setup working correctly. Following this tutorial: http://ianpetzer.wordpress.com/2013/06/14/getting-started-with-integration-testing-ember-js-using-ember-testing-and-qunit-rails/ Using Rails 4
exists = (selector) ->
!!find(selector).length
module "Ember.js Library",
setup: ->
Ember.run App, App.advanceReadiness
teardown: ->
App.reset()
test "Check HTML is returned", ->
visit("/").then ->
ok exists("div"), "Found HTML!"
Tests completed in 137 milliseconds.
0 assertions of 1 passed, 1 failed.
Ember.js Library: Check HTML is returned (1, 0, 1)Rerun64 ms
Found HTML!
Source:
at http://localhost:3000/assets/features/testing_qunit_setup.js?body=1:19:14
at invokeCallback (http://localhost:3000/assets/ember.js?body=1:8055:19)
at null.<anonymous> (http://localhost:3000/assets/ember.js?body=1:8105:11)
at EventTarget.trigger (http://localhost:3000/assets/ember.js?body=1:7878:22)
at http://localhost:3000/assets/ember.js?body=1:8172:17
at Object.DeferredActionQueues.flush (http://localhost:3000/assets/ember.js?body=1:5459:24)
at Object.Backburner.end (http://localhost:3000/assets/ember.js?body=1:5545:27)
at Object.Backburner.run (http://localhost:3000/assets/ember.js?body=1:5584:18)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment