Age | Commit message (Collapse) | Author | Files | Lines |
|
Without this patch Ruby 1.9 is still complaining loudly about trying to
parse the spec files. The previous attempt to clean up this problem in
edc3ddf works for Ruby 1.8 but not 1.9.
I'd prefer to remove the shebang lines entirely, but doing so will cause
encoding errors in Ruby 1.9. This patch strives for a happy middle
ground of convincing Ruby it is actually working with Ruby while not
confusing it to think it should exec() to rspec.
This patch is the result of the following command run against the source
tree:
find spec -type f -print0 | \
xargs -0 perl -pl -i -e 's,^\#\!\s?/(.*)rspec,\#! /usr/bin/env ruby,'
|
|
Before the addition of smf instances, the smf service instances were not
present in the `puppet resource service` output. Instead it used to
collect the legacy init.d services. This commit adds the self.instances
method which collects the `svcs` output and parses it to find smf
instances. This commit also adds test cases for this feature.
|
|
Without this patch some spec files are using `ruby -S rspec` and others
are using `rspec`.
We should standardize on a single form of the interpreter used for spec
files.
`ruby -S rspec` is the best choice because it correctly informs editors
such as Vim with Syntastic that the file is a Ruby file rather than an
Rspec file.
|
|
This spec was stubbing features to make Puppet::Util.absolute_path? behave as
if on posix, but changes in #12101 made that method use File::ALT_SEPARATOR.
It also introduced the :as_platform context for specs to abstract this type of
stubbing.
|
|
By default running `svcadm enable example` will start the service in the
background and won't return errors if it fails. Using the -s option will cause
svcadm to wait and return errors back to the provider if the service cannot
start for some reason.
|
|
The method Puppet::Util.absolute_path? accepts a path and an optional
platform (:windows or :posix) as an argument. If no platform is given,
it will default to the local platform. The method will return true if
the path provided is absolute on that platform, and false if it is not.
This method is also being used in Puppet::Util.which in lieu of testing
against a platform-specific regex inline.
|
|
Several tests were broken due to pecularities of Windows
and Ruby on Windows:
* Ruby on windows does not differentiate between group and
other file permissions.
* All open file handles must be closed before the file can
be deleted
* Sometimes the current working directory (Dir.getwd) is
reported as C:/foo and other times as C:\\foo, which
confuses the spec tests.
* Ruby's sprintf formats floating point values differently
on Windows vs Unix. The Windows exponent has an extra
leading zero.
* Needed to stub execution of security command with the
SMF service provider.
Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
(cherry picked from commit 0e4ae653c0628cb0df9ccace98bca4bc7478fb7c)
|
|
We now use a shebang of: #!/usr/bin/env rspec
This enables the direct execution of spec tests again, which was lost earlier
during the transition to more directly using the rspec2 runtime environment.
|
|
rspec2 automatically sets a bunch of load-path stuff we were by hand, so we
can just stop. As a side-effect we can now avoid a whole pile of stupid things
to try and include the spec_helper.rb file...
...and then we can stop protecting spec_helper from evaluating twice, since we
now require it with a consistent name. Yay.
Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
|
|
updated spec
|
|
|
|
|