I want to be able to write jasmine-like tests in Matlab. So something like
expect(myfibonacci(0)).toBe(0);
expect(myfibonacci(5)).toBe(15);
expect(myfibonacci(10
Your class definition works fine if you create a function instead of script
So instead of testscript.m
containing
expect(myfibonacci(0)).toBe(0);
expect(myfibonacci(5)).toBe(15);
expect(myfibonacci(10)).toBe(55);
you need a function testfunc.m
containing
function testfunc
expect(myfibonacci(0)).toBe(0);
expect(myfibonacci(5)).toBe(15);
expect(myfibonacci(10)).toBe(55);