Just discovered this so apologies if I'm doing something wrong ...
The utils here seem great, but rather than always checking against $output, I would like to use the same utils to test against a file which is generated. I'd really like a simple way to use all of the same goodies but against any file I generated.
Here is my simple hack to enable this for assert_output: squito@1ae8341
if you think this is useful and have suggestions for the api (should it really be a different function, not assert_output?), then I could fix it up, add tests etc and submit a PR.
UPDATE I've added this in a few more places, its available in my fork here: https://github.com/squito/bats-assert/tree/assert_output_file
though the only "tests" so far are that I use it, and it seems to work.
Just discovered this so apologies if I'm doing something wrong ...
The utils here seem great, but rather than always checking against
$output, I would like to use the same utils to test against a file which is generated. I'd really like a simple way to use all of the same goodies but against any file I generated.Here is my simple hack to enable this for
assert_output: squito@1ae8341if you think this is useful and have suggestions for the api (should it really be a different function, not
assert_output?), then I could fix it up, add tests etc and submit a PR.UPDATE I've added this in a few more places, its available in my fork here: https://github.com/squito/bats-assert/tree/assert_output_file
though the only "tests" so far are that I use it, and it seems to work.