it 'adds validation exceptions raised by service to #errors' do
     ve = ValidationException #a java exception
     ve.stub(:localized_message).and_return('a bunch of errors')
    ....


Just clarifying, but did you mean
    ve = ValidationException.new


I tried replicating your spec but with java.lang.RuntimeException
instead of ValidationException and I got
   exception class/object expected

because raise expects an instance of the exception, not the exception
class. Am I missing something?

Best,
Sidu.
http://c42.in
http://blog.sidu.in



On 23 August 2011 03:20, Lenny Marks <le...@aps.org> wrote:
> service.stub(:validateTaskForSave).and_raise(ve)
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to