Commit Graph

122 Commits

Author SHA1 Message Date
Tim Sharpe c2fd88f249 Bump to 0.0.7 2011-08-29 14:19:50 +12:00
Tim Sharpe ac695d6043 Add support for testing undefined resource parameters
Closes #13
2011-08-29 14:18:22 +12:00
Tim Sharpe 20cfb2d7c0 Prettify README with some syntax highlighting 2011-08-11 12:56:41 -07:00
Tim Sharpe 77307cbda0 Bump to 0.0.6 2011-08-10 18:55:11 -07:00
Tim Sharpe 41c07fa5f5 Merge pull request #11 from puppetlabs/master
fixes 2.7 support
2011-08-10 18:53:43 -07:00
Dan Bode 1cbaf48a48 Merge branch 'puppetlabs-master' 2011-08-10 18:13:59 -07:00
Dan Bode f50fc9cb87 Remove Faces API call.
Previously, used the catalog face for
compilation with the :use_node option.

Starting in 2.7.2rc2, all faces options
must be explicit, so the catalog face
no longer supports the use_node option.

This commit changes the call to use
the indirection directly.
2011-08-10 18:04:15 -07:00
Tim Sharpe d13bee6a26 Update README to suggest contain_ over create_ 2011-08-10 17:36:17 -07:00
Tim Sharpe 3e2b4ce2ef Remove quotes from resource refs to match puppetlabs style 2011-08-07 00:45:24 -07:00
Tim Sharpe c112f1f385 Rebump due to fail package 2011-08-07 00:26:26 -07:00
Tim Sharpe 24a3186120 arrg, forgot to update gemspec 2011-08-07 00:25:49 -07:00
Tim Sharpe 73f1781fd6 Bump minor version 2011-08-07 00:17:15 -07:00
Tim Sharpe 6d6c990f08 Merge pull request #8 from puppetlabs/master
pull request
2011-08-04 14:55:40 -07:00
Dan Bode 45323bbc48 Merge pull request #2 from bodepd/resource_exists_check
Resource exists check
2011-08-03 18:00:47 -07:00
Dan Bode 0679654ff4 Check resources exist before verifying their params
Previously, I was seeing the error
undefined method `parameters' for nil:NilClass in
cases where with_param was specified for resources
that did not exist in the catalog.

This patch will not check the chained params if
the resource does not exist.
2011-08-03 17:56:53 -07:00
Dan Bode b4cf689738 Merge pull request #1 from mlitteken/merged_with_matthaus
Commits cleaned up, ready for merge
2011-08-03 09:06:21 -07:00
Dan Bode 0888e0e4f4 Support non-string types as param values
Previously boolean, hash, and array param
values were not supported for defined or classes.

Now, we are using inspect instead of to_s so they
will be returned as the correct reprentation of
their type to Puppet.

Reviewed-by: Matthaus Litteken <matthaus@puppetlabs.com>
Signed-off-by: Dan Bode <dan@puppetlabs.com>
2011-08-03 08:54:37 -07:00
Matthaus Litteken 7d46c1e999 Quote class name
In case it contains non-alpha-numerics.

Previously, you could not specify classes with
namespaces like: foo::bar

Reviewed-by: Dan Bode <dan@puppetlabs.com>
Signed-off-by: Matthaus Litteken <matthaus@puppetlabs.com>
2011-08-03 08:54:37 -07:00
Matthaus Litteken 7a8c7e9c24 Add pre_condition
Allows you to specify external dependencies
for classes/defines.

Reviewed-by: Dan Bode <dan@puppetlabs.com>
Signed-off-by: Matthaus Litteken <matthaus@puppetlabs.com>
2011-08-02 17:42:11 -07:00
Tim Sharpe 1c794fc8b8 Merge pull request #7 from mlitteken/patch_four
DRY up class_example_group and define_example_group
2011-08-02 03:30:46 -07:00
Matthaus Litteken cb7722fac3 Moved repeated code from both example_groups into a support module and build_catalog method in support.rb. 2011-08-01 10:23:30 -07:00
Tim Sharpe dc7bb983fd Use Puppet::Resource::Catalog#resource 2011-07-21 11:49:46 +10:00
Tim Sharpe 944fe22b97 Bump to 0.0.3 2011-07-21 10:50:02 +10:00
Tim Sharpe 2b70ccaac8 Populate $hostname and $fqdn facts automatically from the node name 2011-07-21 10:49:18 +10:00
Tim Sharpe f64a892689 Where type names contain ::, use __ 2011-07-21 10:48:37 +10:00
Tim Sharpe df94c1b7b6 Allow contain_<type> along with create_<type> 2011-07-21 07:23:44 +10:00
Tim Sharpe 8e1ab8348c Bump version to 0.0.2 2011-07-19 12:24:05 +10:00
Tim Sharpe ae27b394a6 Plurals are good 2011-07-19 12:19:09 +10:00
Tim Sharpe 6c0b835990 Start documenting all the things 2011-07-19 12:18:08 +10:00
Tim Sharpe 9be01204e6 MIT License 2011-07-19 11:48:58 +10:00
Tim Sharpe 5704939cd3 Add some real basic test cases 2011-07-19 09:54:17 +10:00
Tim Sharpe 361022726a Update readme 2011-07-19 09:32:20 +10:00
Tim Sharpe a9dbacd03e Default module_path set in RSpec.configure
Can still be overridden with let(:module_path) as before
2011-07-19 09:26:34 +10:00
Tim Sharpe 4c9d43aec8 copy paste fail 2011-07-19 08:30:24 +10:00
Tim Sharpe c722b015eb Work around the autoloader if we're testing a standalone module 2011-07-19 08:24:38 +10:00
Tim Sharpe c5d7b8d7db Get rid of gem build warnings 2011-07-19 07:18:55 +10:00
Tim Sharpe 7ba60da794 Abuse method_missing to create a generic matcher for resourcs 2011-07-19 07:17:18 +10:00
Tim Sharpe 845310cd1a Make parameters optional for defines 2011-07-18 18:17:46 +10:00
Tim Sharpe 2f767ea2a8 Update todo list 2011-07-18 17:02:33 +10:00
Tim Sharpe 53c70d4324 fix merge fail 2011-07-18 16:52:49 +10:00
Tim Sharpe e6b36a801e params should be optional for classes 2011-07-18 16:52:18 +10:00
Tim Sharpe 137881550e Merge Dan's 2.7 fixes into define example group 2011-07-18 16:51:26 +10:00
Tim Sharpe e2dfb58789 Merge branch 'dans_working_branch' of https://github.com/bodepd/rspec-puppet into bodepd-dans_working_branch
Conflicts:
	lib/rspec-puppet/example/class_example_group.rb
	lib/rspec-puppet/example/define_example_group.rb
2011-07-18 16:38:00 +10:00
Tim Sharpe 1758127ff3 and this 2011-07-18 16:04:40 +10:00
Tim Sharpe 39af1a9413 Clean up class example group too 2011-07-18 16:03:47 +10:00
Tim Sharpe effb1facc9 Eugh, there was a lot of stupid in there 2011-07-18 16:02:17 +10:00
Dan Bode 79be9dd45a Added 2.7 support to catalog indirection call
As of 2.7.x, all indirections should be accessed
through the faces API.
2011-07-17 22:29:00 -07:00
Dan Bode 915b858252 Refactor fact and node lookup
Refactored the fact and node lookup to not use the
terminus. The terminus could wind up looking
in unexpected places and would introduce
unnessary system requirements into the tests.
2011-07-17 22:29:00 -07:00
Dan Bode 935538be2a Added support for param classes
Added support for param classes in the class
example group.

This commit also changes the call to get the
description from:

self.class.meta[:example_group][:full_description]

to self.class.top_level_description.downcase

This provides better support nested descriptions.
(The previous code was concatenating the nested
descriptions which was not creating a valid
klass name for my working example)

Now, the only requirement is that the top level
description is the same as the class name.
2011-07-17 22:29:00 -07:00
Dan Bode 1642c83050 Changed let method from name to title
To conform better with Puppet's terminology.
2011-07-17 22:27:46 -07:00