Ruby, rspec Expect error when testing method
问题 I have a method that looks like build_object(arg1, arg2, arg3, arg4, arg5) I want to test this method when a certain value is passed for arg5. I am trying something like expect(my_method(p1, p2, p3, p4, bad5)).to raise_error(ArgumentError) I get the following error: ArgumentError: The expect syntax does not support operator matchers, so you must pass a matcher to `#to`. I am very new to Ruby and rspec testing, so any help is appreciated. Please explain what your answer is doing so that I