Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose 'catalogue' method as consistent API in example groups #145

Merged
merged 1 commit into from
Jan 25, 2014

Conversation

domcleal
Copy link
Contributor

In rspec-puppet pre-1.0, the catalogue method was available in all example groups with no arguments. This has been restored, so the catalogue is easily accessible in derivative example groups where subject is overridden (e.g. so subject can be redefined as a resource inside the catalogue).

I don't think without this there's an easy way to get at the catalogue without knowing the parent example group type (class, define, host).

In rspec-puppet pre-1.0, the catalogue method was available in all example
groups with no arguments.  This has been restored, so the catalogue is easily
accessible in derivative example groups where subject is overridden (e.g.
so subject can be redefined as a resource inside the catalogue).
@rodjek
Copy link
Owner

rodjek commented Jan 25, 2014

You really shouldn't be relying on an internal API method like that.

rodjek pushed a commit that referenced this pull request Jan 25, 2014
Expose 'catalogue' method as consistent API in example groups
@rodjek rodjek merged commit bab2839 into rodjek:master Jan 25, 2014
@carlossg
Copy link
Contributor

is the expected usage

subject.resource('file', 'myfile').send(:parameters)[:content]

instead of using catalogue?
because that is broken in 34220fc after subject was changed to be a lambda

@carlossg
Copy link
Contributor

carlossg commented Feb 1, 2014

never mind, saw the note in #151 about the breaking change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants