Closed hgregorian closed 8 years ago
@yzl Can you take a quick look at this? I suspect tests are passing because the fixture has hyphens. https://github.com/chef-cookbooks/supermarket-omnibus-cookbook/blob/c526672b51e80611b3ede1266ed4e66b7e256475/test/fixtures/cookbooks/test/recipes/custom_repo_setup.rb#L2
In the 'chef-ingredient' namespace, the attribute is named custom-repo-recipe
.
This cookbook (supermarket-omnibus-cookbook) refers to the similarly named (but different) "passthrough" attribute as custom_repo_recipe
. The test cookbook referenced above references the attribute with hyphens instead of underscores.
ChefSpec passes because the attribute is set in the test thereby masking the naming error in the test cookbook recipe.
@robbkidd I will fix. And I hate hyphens and underscores.
While well-intentioned, the "passthrough" attribute for a custom repository is non-functional due to attribute misnaming:
https://github.com/chef-cookbooks/supermarket-omnibus-cookbook/blob/7fdad3a40a8d93bbddcbd884d9d88aca6b822d79/libraries/supermarket_server.rb#L81
Should be:
_(--hyphens-- not underscores)