Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Refactor #6044 -- use _spec.rb as the pattern for spec tests. | Daniel Pittman | 2011-01-27 | 1 | -112/+0 |
| | | | | | | Rename all the spec tests to follow the rspec convention of *_spec.rb rather than unadorned *.rb; this also makes it easier to work with them consistently without using the Rakefile support that customizes that. | ||||
* | Refactor #6044 -- require spec_helper with a consistent path. | Daniel Pittman | 2011-01-27 | 1 | -1/+1 |
| | | | | | | Because we pull in spec_helper in individual tests, we need to use a consistent path or Ruby will evaluate it multiple times. Make the path consistent by expanding it before require. | ||||
* | Refactor #6044 -- port testing to rspec2 | Daniel Pittman | 2011-01-27 | 1 | -3/+3 |
| | | | | We have moved to rspec2 for puppet, and facter should follow suit. | ||||
* | [#2330] Uptime should not make redundant system calls | Rein Henrichs | 2010-08-03 | 1 | -0/+112 |
Rewrite of uptime facts and supporting utility methods. Works on unix, BSD, windows. No longer makes redundant system calls. Uses Facter::Util::Uptime utility methods: * Implemented uptime_seconds_unix using /proc/uptime or who -b on unix, sysctl on BSD. Added unit tests for the behaviors of get_uptime_seconds_unix: read from proc/uptime, read uptime from "sysctl -b kern.boottime", read uptime from "who -b", and return nil if nothing else works. * Implemented uptime_seconds_win using the Win32 API. Facts implemented: * uptime_{seconds,hours,days} Returns the respective integer value. * uptime Returns human readable uptime statistic that preserves original behavior. Examples: 3 days 1 day 5:08 hours 0:35 hours |