| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
We replace it with an instance of the actual resource we are testing, which
reduces the number of ways this code is tied to the specific implementation.
Reviewed-By: Nick Lewis <nick@puppetlabs.com>
|
|
|
|
|
|
|
|
| |
This was a helper that implemented rspec style "shared behaviour" for
Test::Unit; now that we have moved on we can use the upstream implementation
instead. This eliminates a whole bit of code we have to maintain.
Reviewed-By: Nick Lewis <nick@puppetlabs.com>
|
|
|
|
|
|
|
|
| |
This is replaced with the new my_fixture{,s} methods; old fixture data is
ported into the spec tests at the same time, but left where it was against
unit tests that require it.
Reviewed-By: Nick Lewis <nick@puppetlabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This uses the propertyclass Puppet::Property::OrderedList to represent
the list of host_aliases. This lets us remove the in_sync, should_to_s
etc overrides.
In the provider class the list is represented by a string (=no array)
so there were a few changes necessary as well.
Because Puppet::Property::List uses the specified delimiter when
converting should values to strings, I changed the delimiter to a simple
space instead a tab. This keeps messages produced by puppet in a nice
format.
The tests had to be changed to work with the new behaviour of
host_aliases. There are a few additional tests as well.
|
|
|
|
|
|
|
|
|
| |
Doing a require to a relative path can cause files to be required more
than once when they're required from different relative paths. If you
expand the path fully, this won't happen. Ruby 1.9 also requires that
you use expand_path when doing these requires.
Paired-with: Jesse Wolfe
|
|
|
|
|
| |
Just a few additional tests for the new property "comment" of the
host type.
|
|
I noticed that the hostprovider will remove all inline comments from the
/etc/hosts file, when puppet updates at least one entry. Puppet will also
remove comments from entries, the user doesnt want to manage with
puppet.
To split up changes a bit this commit will only introduce tests for the
host type and the hostprovider. A few will fail, indicating the bug:
The hostprovider parses all entries and builds a hash. When building
the recordhash all comments are discarded. When puppet has to update at
least one entry it uses the to_line function to convert the record hash
back to a file. Because the comments are not stored in the hash, they
cannot be written back to the file.
|