... thoseconstraints as w e l l :Download Factorial.rbdef test_raises_on_negative_inputassert_raise(ArgumentError) { -1.factorial }enddef test_factorial_does_not_work_on_floatsassert_raise(NoMethodError) ... may let y o u play fast andloose with types, but it still doesn’t make sense to callfactorial()on a string. Y o u need to use contract-orientedunit tests, discussed in Tip 3, Design with T e ... u use. Most languages willhave both the usual bases covered (assertions, test setup,and teardown) and some facility for fake objects (mocks,stubs). Install any tools y o u need to get these...