public

  • Download Gist
failing_test_fixture.html
HTML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 
<head>
<title>Graphics | JavaScript Testing Results</title>
<link rel="stylesheet" href="screw.css" type="text/css" charset="utf-8" />
<script type="text/javascript" src="../../../vendor/plugins/blue-ridge/lib/blue-ridge.js"></script>
</head>
 
<body>
<!-- Put any HTML fixture elements here. -->
<div id="stuff"></div>
<script>
$(document).ready(function () {
$("#stuff").text("this page is ready");
}
);
</script>
</body>
</html>
failing_test_spec.js
JavaScript
1 2 3 4 5 6 7 8 9
require("spec_helper.js");
 
Screw.Unit(function(){
describe("Graphics", function(){
it("does something", function(){
expect($("#stuff").text()).to(equal, "this page is ready");
});
});
});

This is a fixture and test from a rails project using the latest version of blue-ridge (http://github.com/relevance/blue-ridge/commit/be33098d4d0d9acbe9f207ba2411af0f06d30575). This feature passes in firefox, but fails from the console: expected null to equal "this page is ready"

As near as I can tell, this is an env.js issue... though it seems like blue-ridge shouldn't make jquery 1.4.2 default since it isn't working properly.

Hmm. Ok. So this doesn't reproduce my issue precisely because switching to jquery 1.3.2 doesn't make this test pass... but am i missing something? shouldn't this test pass using rhino since it passes in the browser?

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.