Closed sa73917 closed 3 years ago
Thanks for the quick review. I've added a commit on the end of the branch that includes the guard
gem in the development dependencies. I've found it really useful to get it to run the appropriate rspec on code change. More than happy to drop the commit if its of no interest, I can just include it locally when I'm developing but figured I'd check.
I've been working on adding support for all the new CLI options available in Terraform 0.14 and 0.15. As there are quite a few parameters available in the CLI that are not in RubyTerraform the PR was starting to look way too large to be digestable :-).
Rather than post a PR with a gazillion changes I thought this seemed like a good first pre-factoring step to seek review on. Essentially replacing the vast majority of the tests with shared examples. It drastically simplifies the specs and will make the new Terraform CLI options much easier to include in future PRs.
Notes:
I didn't bother replicating these, given that there's usually 10-20 tests following them that all require their command line to start with the same string these were testing for (eg.
terraform init <thing being tested>
). Otherwise, as far as I can tell, I've replicated all the existing tests.refresh_spec.rb
) that included a-var-files
test and a-var-file
with-var-files
test, but no singular-var-file
test. I built the shared example fromapply_spec.rb
(that did include all three tests) so all the specs that use that shared example now include all three tests.