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
I think the important thing to recognize is that MATLAB is not JavaScript. The jasmine-like syntax utilizes the semantics of JavaScript for this API. I think when designing any API it is important and valuable to think about the language it is written in and subscribe not only to its technical limitations, but also to its technical strengths and its established idioms.
As Sam alluded to this is the approach taken in the MATLAB Unit Test Framework. For example, the constraints approach does not attempt to invoke a function immediately after any other function call or indexing operation, but rather constructs the constraint directly and names the constraint so as to create a literate programming interface. One example strength of MATLAB in this case is that it doesn't require a "new" before construction like Java/C#/etc do. You can actually see similar tradeoffs being done with Hamcrest matchers and NUnit constraints, neither of which subscribe to the same approach to producing their literate verifications, preferring instead to design their approaches after the languages to which they are written in.
Also, while it is indeed a unit test framework, it certainly can be used to write other types of tests like system/integration. Given you mentioned you are actually writing tests, I would highly recommend utilizing the solution that is already available rather than reinventing the wheel. There is quite a lot of investment in the constraints and the other surrounding features of the framework, and it is definitely production grade.