>
> On Aug 22, 2011, at 5:50 PM, Lenny Marks wrote:
>
>> JRuby 1.6.2
>> rspec-core (2.6.4)
>> rspec-expectations (2.6.0)
>> rspec-mocks (2.6.0)
>> rspec-rails (2.6.1)
>>
>> I'm sure this has more to do with the way JRuby wraps Java exceptions but I
>> figured I'd post here in case anyone here h
Please ignore my previous question - I just realised you're doing
Java::java.lang.NullPointerException.new in your second example. I'm
seeing the same behaviour and can't think of any way around it off the
top of my head.
You could try redefining Java::JavaLang::NullPointerException to be a
Ruby R
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 jav
JRuby 1.6.2
rspec-core (2.6.4)
rspec-expectations (2.6.0)
rspec-mocks (2.6.0)
rspec-rails (2.6.1)
I'm sure this has more to do with the way JRuby wraps Java exceptions but I
figured I'd post here in case anyone here has any insight or pointers. In the
context of writing a spec for a model like t