escapestudios-cookbooks/newrelic — pull request #117 by jujugrrr (2014-08-29 13:55:48+00:00)
Title: Make templates configurable(easier to do cookbook wrapper)

Sometime you might want to use a different template, adding the `cookbook` attribute to the template definition makes the newrelic cookbook easier to tune with parameters.

### tests
I've seen there is #75 , so I've added tests. It's all good for nodejs and python, the php ones needs more work to handle all the cases and check all the notifies. Hopefully it's a good start!
Because none of the tests are OS specific I've created a new context, and you can add tests in OS specific context if you need to (it should make it faster to run and remove a lot of duplication, I've not done it for server_monitor_agent_spec.rb as you might disagree on the implementation.

#### pending step
Chefspec only support run_execute, so we cannot test if you just defined an execute with the action nothing https://github.com/sethvargo/chefspec/blob/master/lib/chefspec/api/execute.rb#L39.

```
.........................

Pending:
newrelic::php_agent Any OS defines newrelic-install execute block
# not yet supported by chefspec
# ./spec/unit/php_agent_spec.rb:29

Finished in 3.4 seconds
38 examples, 0 failures, 1 pending

ChefSpec Coverage report generated...

Total Resources: 19
Touched Resources: 10
Touch Coverage: 52.63%
```