Created
November 19, 2008 21:23
-
-
Save wycats/26729 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Common JavaScript code across your application goes here. | |
$("p").click(function() { | |
$(this).replaceWith("<input type='text' name='testing' />") | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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