Paired-with: Nick Lewis
Signed-off-by: Matt Robinson <[email protected]>
---
Local-branch: ticket/next/5543
spec/support/factories.rb | 23 -----------------------
spec/views/reports/index.html.haml_spec.rb | 2 +-
2 files changed, 1 insertions(+), 24 deletions(-)
delete mode 100644 spec/support/factories.rb
diff --git a/spec/support/factories.rb b/spec/support/factories.rb
deleted file mode 100644
index 2f51e64..0000000
--- a/spec/support/factories.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# TODO figure out how to add these to exemplar.
-
-class Report
- def self.generate_for(node, time=Time.now, status='unchanged')
- report = Report.new
- report.time = time
- report.status = status
- report.host = node
- report.node = node
- report.stubs(:process_report => true)
- report.stubs(
- :failed_resources? => report.status == 'failed',
- :total_resources => 1,
- :failed_resources => report.status == 'failed' ? 1 : 0,
- :failed_restarts => 0,
- :skipped_resources => 0,
- :config_retrieval_time => 0.1,
- :total_time => 0.1
- )
- report.save!
- return report
- end
-end
diff --git a/spec/views/reports/index.html.haml_spec.rb
b/spec/views/reports/index.html.haml_spec.rb
index f2c5811..854b30e 100644
--- a/spec/views/reports/index.html.haml_spec.rb
+++ b/spec/views/reports/index.html.haml_spec.rb
@@ -4,7 +4,7 @@ describe "/reports/index.html.haml" do
describe "the response" do
before :each do
@nodes = [Node.generate!, Node.generate!]
- assigns[:reports] = @reports = @nodes.map { |node|
Report.generate_for(node) }.paginate
+ assigns[:reports] = @reports = @nodes.map { |node|
Report.generate!(:host => node.name) }.paginate
render
end
--
1.7.3.1
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.