Sha256: 6866c4fe1e8e2266c14604d6b86dde06fa1bf19cddb041e032ec0619a4292a30

Contents?: true

Size: 627 Bytes

Versions: 11

Compression:

Stored size: 627 Bytes

Contents

u = up.util
$ = jQuery

replaceStateHelperCount = 0

beforeAll ->
  @hrefBeforeSuite = location.href
  @titleBeforeSuite = document.title

afterAll (done) ->
  up.util.task =>
    history.replaceState?({ fromResetPathHelper: true }, '', @hrefBeforeSuite)
    document.title = @titleBeforeSuite
    done()

beforeEach ->
  # Webkit ignores replaceState() calls after 100 calls / 30 sec.
  # So specs need to explicitely activate history handling.
  up.history.config.enabled = false

  # Store original URL and title so we can restore it in afterEach.
  @hrefBeforeExample = location.href
  @titleBeforeExample = document.title

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
unpoly-rails-1.0.3 spec_app/spec/javascripts/helpers/reset_history.js.coffee
unpoly-rails-1.0.1 spec_app/spec/javascripts/helpers/reset_history.js.coffee
unpoly-rails-1.0.0 spec_app/spec/javascripts/helpers/reset_history.js.coffee
unpoly-rails-0.62.1 spec_app/spec/javascripts/helpers/reset_history.js.coffee
unpoly-rails-0.62.0 spec_app/spec/javascripts/helpers/reset_history.js.coffee
unpoly-rails-0.61.1 spec_app/spec/javascripts/helpers/reset_history.js.coffee
unpoly-rails-0.61.0 spec_app/spec/javascripts/helpers/reset_history.js.coffee
unpoly-rails-0.60.3 spec_app/spec/javascripts/helpers/reset_history.js.coffee
unpoly-rails-0.60.2 spec_app/spec/javascripts/helpers/reset_history.js.coffee
unpoly-rails-0.60.1 spec_app/spec/javascripts/helpers/reset_history.js.coffee
unpoly-rails-0.60.0 spec_app/spec/javascripts/helpers/reset_history.js.coffee