puppetlabs/puppet-dashboard — pull request #147 by sodabrew (2012-12-10 08:49:41+00:00)
Title: Call Metric.new instead of metrics.new

Calling `metrics.new` was duplicating all metrics, rather than only adding the one metric. Resolves this test failure:

```
1) Report post transformer munging should idempotently update statuses and metrics
Failure/Error: ]
expected collection contained: [["resources", "pending", 1], ["resources", "unchanged", 0]]
actual collection contained: [["resources", "pending", 1], ["resources", "pending", 1], ["resources", "unchanged", 0], ["resources", "unchanged", 0]]
the extra elements were: [["resources", "pending", 1], ["resources", "unchanged", 0]]
# ./spec/models/report_spec.rb:103
```