1 require File.dirname(__FILE__) + "/../spec_helper"
3 describe "Java invocation errors" do
4 describe "(calling constructor)" do
5 it "should fail correctly when called with wrong parameters" do
7 java.util.HashMap.new "str"
8 end.should raise_error(NameError)
12 describe "(calling instance method)" do
13 it "should fail correctly when called with wrong parameters" do
15 java.util.ArrayList.new.add_all "str"
16 end.should raise_error(NameError)