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

Can't find hasClassName when loading lowpro and prototype together #22

Closed pelargir closed 15 years ago

pelargir commented 15 years ago

Loading lowpro.js and prototype.js alongside each other gives this error when running the default spec file:

FAILED: Your application javascript - accesses the DOM from fixtures/application.html
TypeError: Cannot find function hasClassName in object Element #1 HTML.

This is how I have them chained:

require("../../public/javascripts/prototype.js", {onload: function()   
    require("../../public/javascripts/lowpro.js", {onload: function() {
        require("../../public/javascripts/application.js");
    }});
}});
karnowski commented 15 years ago

@pelargir: Is this failing only from the command-line? Does it work okay when ran via the browser?

pelargir commented 15 years ago

Yes, it passes in Firefox. (In Safari, the page loads but nothing happens, no output is printed, and no JS errors occur.) Still failing on the command line and in TextMate.

karnowski commented 15 years ago

@pelargir: This feels like an env.js issue. I just updated Blue Ridge to use the latest env.js (1.0rc7), so it might be fixed. If it doesn't, we should bring this up on the env.js Lighthouse: http://envjs.lighthouseapp.com/projects/21590-envjs/overview