Puppet: System Administration Automated

Support

Ticket #1156 (closed refactor: fixed)

Opened 8 months ago

Last modified 8 months ago

Add rspec tests for lib/puppet/util/loadedfile.rb

Reported by: plathrop Assigned to: luke
Priority: normal Milestone:
Component: library Version: 0.24.3
Severity: minor Keywords: rspec
Cc: Triage Stage: Ready for checkin
Attached Patches: Tests Complexity: Easy

Description

Add rspec tests for lib/puppet/util/loadedfile.rb

Change History

03/25/08 00:19:31 changed by plathrop

  • owner changed from community to plathrop.
  • status changed from new to assigned.
  • type changed from defect to refactor.
  • severity changed from normal to minor.
  • stage changed from Unreviewed to Accepted.

03/25/08 00:21:27 changed by plathrop

  • owner changed from plathrop to luke.
  • status changed from assigned to new.
  • complexity changed from Unknown to Easy.
  • stage changed from Accepted to Ready for checkin.
  • patch changed from None to Tests.

First stab at this is available in my repository as commit 077312af8670cb035506aa4eefe3d7a677dac029 of branch 0.24.x

Luke, when you have a few, I'd appreciate some feedback. It seems like very little, but I think it exercises the important parts of the class... am I missing anything?

Toss the ticket back to me if I need to add/change anything.

Thanks.

03/25/08 22:11:19 changed by plathrop

I added some more tests after looking at the old unit tests. They are in commit [9cf7150549caf5d21a2a22f30d92cd5a73d00a40] of branch 0.24.x in my repo.

04/07/08 21:49:30 changed by plathrop

Luke,

Based on your recommendations I've used stubs to remove the need for the sleep() calls as well as decouple from the underlying behavior of the filesystem. The latest iteration is available as commit [7295626c25ab878aaaf6ec577a42f91c0f18fdbc] of branch unit-tests in my repository. Let me know what you think.

04/08/08 17:22:13 changed by luke

  • status changed from new to closed.
  • resolution set to fixed.

Merged and pushed. Thanks!