Permalink
Browse files

Tests: reset the stack on each test

  • Loading branch information...
1 parent 7ade549 commit 86a4dfb459e78adba11d434aedb4b2d3d05a105e @rstacruz rstacruz committed Aug 25, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 spec/jquery.turbolinks_spec.coffee
@@ -21,10 +21,15 @@ describe '$ Turbolinks', ->
callback1 = callback2 = null
+ # Simulate a reset.
+ beforeEach ->
+ $.turbo.isReady = false
+ $.turbo.use 'page:load', 'page:fetch'
+ $(document).off('turbo:ready')
+
describe "DOM isn't ready", ->
beforeEach ->
- $.turbo.isReady = false
$(callback1 = sinon.spy())
$(callback2 = sinon.spy())

0 comments on commit 86a4dfb

Please sign in to comment.