Closed jvrplmlmn closed 7 years ago
Thanks for trying it!
It looks pretty messed in Travis:
Apart of that, is it possible just to loop through the platforms in spec where tests are 100% identical? To avoid huge code duplication. Otherwise, I'm not sure if this going to be helpful.
So expectation and reality differs here dramatically :smiley: Most probably we'll discourage writing tests. IMO, if the process of adding tests/spec looks ugly, - we'd rather throw it and keep old state.
Thoughts?
I have no idea why Travis shows that output...
When running KITCHEN_LOCAL_YAML=.kitchen.docker.yml /opt/chefdk/bin/chef exec rake default
locally this is how the output is displayed:
Apart of that, is it possible just to loop through the platforms in spec where tests are 100% identical? To avoid huge code duplication. Otherwise, I'm not sure if this going to be helpful.
@armab take a look at 414275b, I managed to get it done for a single spec. I'll try to get the rest done later on.
I guess that there is some room for additional compactation in spec/recipes/_packages_spec.rb
, but I think that the code its more readable as it is.
What about now @armab ?
If you are looking to combine things, i would look at the shared_examples
rspec directive
http://modocache.io/shared-examples-in-rspec
@armab I've included the changes added on https://github.com/StackStorm/chef-stackstorm/pull/57, would you mind taking a look?
Solves https://github.com/StackStorm/chef-stackstorm/issues/54
It is my first time writing multi-platform ChefSpec, so probably there is room for improvement.
WDYT @armab @shortdudey123 ?