Age | Commit message (Collapse) | Author | Files | Lines |
|
In rspec 2.11, expectations on a block must take the form of expect...to or
lambda...should. Other combinations of those are no longer accepted. This
commit converts all mixed cases to use expect...to, as it seems to be the
preferred syntax now.
|
|
This implement support for options with default values, allowing faces to set
those values when not invoked. This can eliminate substantial duplicate code
from actions, especially when there are face-level options in use.
Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
|
|
The problem was caused by the fact that the
options method returns a list of options that
treated the aliases as seperate options.
The fix is to only maintain a list of options
and not add all aliases to the options list.
|
|
Pre-released versions of faces may have used the "desc" option, which
was later changed to "description", and an alias provided for "desc". The
previous fix for 8048 removed this backwards compatibility (since it was
never released to customers). This commit fixes the test case that
assumed the "desc" option was still available.
Reviewed-By: Daniel Pittman <daniel@puppetlabs.com>
|
|
|
|
`before_action` decorations should always resolve in resolution order
from most general (inherited from furthest away) to most specific
(declared on the instance), and should always execute Face-level
option decorations before action-level option decorations.
`after_action` decorations should execute in the opposite order.
Reviewed-By: Daniel Pittman
|
|
This extends the last of the documentation support, down into options, so they
can be described as expected. In the process we split out the modular docs
API into a full and short version options only want short docs, but the
behaviours are identical to the full version.
|
|
As per the design decision documented in #7131, optional arguments to
options will no longer be supported. This patch causes such optional
arguments to raise an error, and tests for this behavior. Also cleaned
up some confusing use of the term "subject" in specs.
Paired-with: Daniel Pittman
|
|
If you're going to use special characters in a file and use Ruby 1.9 you
need to specify the character encoding at the top of the file.
Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
This is legal, and defines an option with an argument for optparse; we want to
make sure that we stay consistent with that in our code handling the same sort
of inputs.
This also adds a framework for later testing any other strange naming bits and
bobs we find around option handling.
Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
|
|
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.
|
|
This ensures that an option declaration that shadows itself is found, and
reported to the user, rather than silently eating one of the two.
This could have actually lost, for example, the distinction between an
argument-requiring and an argument-missing variant of the same thing.
Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
|
|
The purpose of this is to adapt the generic option support in our strings to
the command line; we adapt the generic option information to optparse, and
establish our environment early in the process to ensure that we can play nice
with Puppet::Application for the moment.
In the process we ensure that we detect, and report, conflicts in option
naming across the board. Additionally, when an option is declared with
multiple aliases, we insist that either all, or none, of them take an
argument.
To support this we support introspecting options having an optional argument,
as well as documentation and all.
Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
|