Browse files

Simple example.

  • Loading branch information...
1 parent 694f145 commit c22167f0c7b33e95513fb27f2368f520b99a348f @dylanegan dylanegan committed with Jan 25, 2010
Showing with 10 additions and 0 deletions.
  1. +10 −0 spec_example.js
View
10 spec_example.js
@@ -27,4 +27,14 @@ describe("A test", function(){
it("Should pass simple sync tests after async ones", function(){
assert(true);
});
+
+ it("should handle assertions for raised exceptions", function() {
+ assertRaise('SpectacularError', function() {
+ function SpectacularError(message) {
+ this.name = 'SpectacularError';
+ this.message = message;
+ };
+ throw new SpectacularError('this is just spectacular');
+ });
+ });
});

0 comments on commit c22167f

Please sign in to comment.