relevance / blue-ridge

Framework for JavaScript Testing (currently a Rails Plugin)
http://groups.google.com/group/blueridgejs
MIT License
480 stars 40 forks source link

Does blue-ridge support cookie test? #23

Closed saberma closed 15 years ago

saberma commented 15 years ago

I use jquery.cookies to do something, when I test it in blue-ridge, it throws this exception: FAILED: History should empty TypeError: Cannot call method "get" of undefined

...

soon, I found "document.cookie" return "undefined" in blue-ridge test.

example like this:

require("spec_helper.js");
require("../../public/javascripts/application.js");

Screw.Unit(function() {
  describe("Your application javascript", function() {
    it("does something", function() {
      expect(document.cookie).to(equal, "some cookie");
    });
  });
});

any help? thanks.

karnowski commented 15 years ago

saberma, this would be an issue in env.js. I recommend posting this on their Lighthouse ticket-tracking page: http://envjs.lighthouseapp.com/projects/21590-envjs/overview

Since this isn't strictly a Blue Ridge issue, I'm marking this as closed. (Thanks for the feedback, though!)