From 25079b8d79b1b4c056fb0a5101346395feb151fa Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Thu, 7 Mar 2013 01:59:12 +0100 Subject: [PATCH] Move hacks for phantomjs to spec.html This ain't pretty, but I just want to see if it helps to fix specs on phantomjs, I may move them to separate file and take into account in Assetfile later. --- assets/scripts/spec/spec_helper.coffee | 23 ----------------- public/spec.html | 35 ++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 23 deletions(-) diff --git a/assets/scripts/spec/spec_helper.coffee b/assets/scripts/spec/spec_helper.coffee index de1a3688..338ffce5 100644 --- a/assets/scripts/spec/spec_helper.coffee +++ b/assets/scripts/spec/spec_helper.coffee @@ -14,26 +14,3 @@ minispade.require 'app' now = -> new Date('2012-07-02T00:03:00Z') $.timeago.settings.nowFunction = -> now().getTime() Travis.currentDate = now - -# hacks for missing features in webkit -unless Function::bind - Function::bind = (oThis) -> - - # closest thing possible to the ECMAScript 5 internal IsCallable function - throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable") if typeof this isnt "function" - aArgs = Array::slice.call(arguments, 1) - fToBind = this - fNOP = -> - - fBound = -> - fToBind.apply (if this instanceof fNOP and oThis then this else oThis), aArgs.concat(Array::slice.call(arguments_)) - - fNOP.prototype = @.prototype - fBound.prototype = new fNOP() - fBound - -window.history.state = {} -oldPushState = window.history.pushState -window.history.pushState = (state, title, href) -> - window.history.state = state - oldPushState.apply this, arguments diff --git a/public/spec.html b/public/spec.html index 19b79d7e..6d1ef344 100644 --- a/public/spec.html +++ b/public/spec.html @@ -6,6 +6,41 @@ Travis CI - Free Hosted Continuous Integration Platform for the Open Source Community + +