Created
February 9, 2011 21:37
-
-
Save mileszs/819354 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // Evergreen adds a require function to Jasmine! | |
| require('/javascripts/jquery-1.4.4.min.js'); | |
| require('/javascripts/my_app.js'); | |
| describe('MyApp', function() { | |
| describe('#photoRemovalPrompt', function() { | |
| // Evergreen also adds the ability to specify a | |
| // template against which to test! | |
| template('edit_profile.html'); | |
| it("should prompt the user upon clicking the remove link", function() { | |
| MyApp.photoRemovalPrompt(); | |
| spyOn(window, 'confirm'); | |
| $('a.remove-photo').click(); | |
| expect(window.confirm).toHaveBeenCalledWith('Are you sure you want to remove this photo?'); | |
| }); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment