stampit-org / stamp-specification

The Stamp Specification: Composables
434 stars 16 forks source link

Fix all tests to create composables as function objects not POJO. #42

Closed koresar closed 9 years ago

koresar commented 9 years ago

stampit v3 is doing stricter checks on what a composable is. It is checking that both stamps and its descriptors are function objects, not just POJO.

So, this PR makes sure that the tests follow specs stricter.

troutowicz commented 9 years ago

I had already proposed this change but @ericelliott and I agreed that it makes sense for spec implementations to be as liberal as possible with stamp type checking. (here and here)

ericelliott commented 9 years ago

I did want to clean up these examples, anyway. As long as the POJO descriptors still work, I'm OK with it. This isn't changing the spec -- just being more conservative with compose() in the tests, which should (somewhat ironically) make the tests more liberal for implementations.

That said, if your implementation is failing the tests as they are, you should probably consider being more liberal in what you accept as inputs.