Adam Cameron
aliaspooryorik
aliaspooryorik
Adam Cameron
the only thing that gets filtered out are interfacesThat seems like the wrong approach to me. Tests are intrinsically only in classes that extend BaseSpec, so that's what one should be looking for. Anything else be it interface, fixture etc are not tests, so should not be included.
I moved our fixtures into another package.Yeah we normally do this. But in this case it's only expectation data that relates solely to the test spec in the same dir.
only files that ended in "Test.cfc" were runThat was actually my expectation here, and we have been diligently naming our test specs thus. This would be a better approach than just filtering interfaces. But not as good as only including classes that actually are test specs. Is the behaviour documented anywhere? I had a quick squizz but didn't find anything. But it I only spent a minute or so on it.
zackster
07/25/2023, 10:37 AMjclausen
07/26/2023, 6:30 PMrun
command to have a glob pattern for the CFC name ( e.g. match="*Spec.cfc"
). It would only be a one-line change to use that variable: https://github.com/Ortus-Solutions/TestBox/blob/development/system/TestBox.cfc#L648Adam Cameron
jclausen
07/26/2023, 8:42 PMx
the tests out until we implement - so having the ability to show bundle files that don’t have any tests present can be helpful/clarifying during development ( e.g. - “Oops! I need to enable/write those tests!” ).
In our case, our convention for CFC’s that support the specs but aren’t runnable is to put them in the tests/resources
directory - this includes abstract specs that extend the base spec, and which are extended by child tests.
I think if we implemented inheritance type checking it might cause problems down the road for any custom usage of TestBox. @lmajano would have to weigh in on that. Having a glob pattern that can be used in the directory list to find the specs seems like a more workable solution.lmajano
07/27/2023, 8:28 AMlmajano
07/27/2023, 8:28 AMaliaspooryorik
Adam Cameron
it
, describe
, etc). So it can hardly be considered a TestBox TestCase. It's just "a file".
I mean even if looked for the implementation of an interface that said "gotta have a run
method" I could understand. But just globbing the dir and then rejecting stuff that doesn't seem to match isn't... as good as it could be, I think.
But sure. Will raise a ticket. If however it breaks backwards compat, I don't really see the point?lmajano
07/27/2023, 10:06 AMlmajano
07/27/2023, 10:06 AMlmajano
07/27/2023, 10:09 AMlmajano
07/27/2023, 10:09 AMlmajano
07/27/2023, 10:09 AMlmajano
07/27/2023, 10:10 AMinit()
we have bundles
we can include one called bundlesPattern
lmajano
07/27/2023, 10:12 AM*Test.cfc, *Spec.cfc
Adam Cameron
Adam Cameron