Permalink
Browse files

add a test for exception propagation

  • Loading branch information...
1 parent 09558bd commit b5303a2154d47c9942ae0f59e1aa25e84326e584 Rafael Sevilla committed Mar 19, 2009
Showing with 9 additions and 0 deletions.
  1. +9 −0 spec/spec_common.rb
View
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
#
# Author:: Rafael R. Sevilla (mailto:dido@imperium.ph)
# Copyright:: Copyright © 2008, 2009 Rafael R. Sevilla
@@ -31,4 +32,12 @@
val.should == 5040
end
+ it "should propagate exceptions to the client" do
+ lambda do
+ @obj.raise_exception
+ end.should raise_error(RuntimeError) do |error|
+ error.message.should == "This error should be expected"
+ end
+ end
+
end

0 comments on commit b5303a2

Please sign in to comment.