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

Getting an error when using '.with()' #19

Closed
aknapp opened this issue Jan 18, 2012 · 3 comments
Closed

Getting an error when using '.with()' #19

aknapp opened this issue Jan 18, 2012 · 3 comments

Comments

@aknapp
Copy link

aknapp commented Jan 18, 2012

Here's my test:

it do should contain_service('autofs').with(
'ensure' => 'running',
'enable' => 'true',
'hasstatus' => 'true'
) end

When I run the tests, I get:

Failures:

  1. autofs::base
    Failure/Error: it do should contain_service('autofs').with(
    NoMethodError:
    undefined method `with' for #RSpec::Puppet::ManifestMatchers::CreateGeneric:0x7f112fba2ad8

    ./modules/autofs/spec/classes/base_spec.rb:13

I was following the example exactly, so I'm not sure what's wrong.

-Andy

@rodjek
Copy link
Owner

rodjek commented Mar 12, 2012

Sorry about the delay. Are you running the latest version of rspec-puppet? The with and without chains only got added in 0.1.1

@aknapp
Copy link
Author

aknapp commented Mar 16, 2012

No worries. Yeah, I'm using the latest version (0.1.1).

@aknapp
Copy link
Author

aknapp commented Oct 24, 2012

So, looking at my above comment, it's pretty obvious that I was just missing the inner {} braces on the with statement. This definitely works for me now, sorry about that :)

@aknapp aknapp closed this as completed Oct 24, 2012
binford2k pushed a commit to binford2k/rspec-puppet that referenced this issue Jul 20, 2022
Ensure FacterImpl consistency between example groups
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

No branches or pull requests

2 participants