Skip to content

Instantly share code, notes, and snippets.

@wycats
Created November 19, 2008 21:23
Show Gist options
  • Save wycats/26729 to your computer and use it in GitHub Desktop.
Save wycats/26729 to your computer and use it in GitHub Desktop.
// Common JavaScript code across your application goes here.
$("p").click(function() {
$(this).replaceWith("<input type='text' name='testing' />")
});
jspec.describe("visiting '/router'", function() {
it("should return text", function() {
var resp = merb.visit("/testage");
$("p").click();
expect($("p").length).to("==", 0);
expect($("input").attr("name")).to("==", "testing")
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment