Skip to content

Instantly share code, notes, and snippets.

@mileszs
Created February 9, 2011 21:37
Show Gist options
  • Select an option

  • Save mileszs/819354 to your computer and use it in GitHub Desktop.

Select an option

Save mileszs/819354 to your computer and use it in GitHub Desktop.
// 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