diff --git a/CHANGELOG.md b/CHANGELOG.md index a966102e7..b8edc0414 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ zombie.js-changelog(7) -- Changelog =================================== +### Version 0.9.6 2011-07-28 + +Implements file:// requests using node.js' native fs module rather than +leaning on its http module (Ryan Petrello) + ### Version 0.9.5 2011-04-11 diff --git a/spec/history-spec.coffee b/spec/history-spec.coffee index f860fee8f..43fa3f496 100644 --- a/spec/history-spec.coffee +++ b/spec/history-spec.coffee @@ -11,7 +11,8 @@ brains.get "/history/redirect", (req, res)-> brains.get "/history/redirect_back", (req, res)-> res.redirect req.headers['referer'] -readmefile = ['file://', process.cwd(), '/', 'README.md'].join('') +readmefile = "file://#{process.cwd()}/README.md" + vows.describe("History").addBatch( "new window": @@ -78,6 +79,7 @@ vows.describe("History").addBatch( "should not fire popstate event": (window)-> assert.isUndefined window.popstate "location": + "open page": zombie.wants "http://localhost:3003/" "should add page to history": (browser)-> assert.length browser.window.history, 1 @@ -88,10 +90,10 @@ vows.describe("History").addBatch( "open from file system": zombie.wants `readmefile` "should add page to history": (browser)-> assert.length browser.window.history, 1 - "should change location URL": (browser)-> assert.equal browser.location, `readmefile` + "should change location URL": (browser)-> assert.equal browser.location, readmefile "should load document": (browser)-> assert.include browser.html(), "zombie.js(1) -- Insanely fast, headless full-stack testing using Node.js" - "should set window location": (browser)-> assert.equal browser.window.location.href, `readmefile` - "should set document location": (browser)-> assert.equal browser.document.location.href, `readmefile` + "should set window location": (browser)-> assert.equal browser.window.location.href, readmefile + "should set document location": (browser)-> assert.equal browser.document.location.href, readmefile "change pathname": zombie.wants "http://localhost:3003/" topic: (browser)->