Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for pre_condition with functions
This commit adds support for using the pre_condition hook to specify the source code that should be used to compile a catalog that can be introspected by functions for testing purposes. This allows users to test functions that need access to catalog contents. This allows the following snippet to test a function that needs access to the catalog generated by pre_condition: describe 'defined_with_params' do #describe 'when resource is passed as a string' do let :pre_condition do 'user { "dan": }' end it { should run.with_params('User[dan]', {}).and_return('true') } end
- Loading branch information