[rspec-users] If a step fails the scenario has a class name of "passed"

aidy lewis aidy.lewis at googlemail.com
Tue Jul 8 11:10:00 EDT 2008


Hi,

Post-story HTML creation if a step within a scenario fails
(class="failed") that scenario still passes ( class="passed").

We have added some javascript to rspec.js

var rspec = {
	load : function() {
		$$(".passed").each (
			function (passedElement) {
				if (passedElement.select(".failed").length > 0) {
					Element.removeClassName(passedElement,"passed");
					Element.addClassName(passedElement,"failed");
				}
			}
		)
	}
}

Event.observe(window,"load",rspec.load);


Aidy


More information about the rspec-users mailing list