-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Fix tests to work with rspec-puppet 2.8.0 #93
Conversation
It looks right, but doesn't work with the PDK I'm using $ rpm -q pdk
pdk-1.18.0.0-1.el8.x86_64
$ pdk test unit
...
Failures:
1) chrony on archlinux-5-x86_64 chrony::config using defaults
Failure/Error: it { is_expected.to contain_file('/etc/chrony.keys').with_content(sensitive("0 xyzzy\n")) }
NoMethodError:
undefined method `sensitive' for #<RSpec::ExampleGroups::Chrony::OnArchlinux5X8664::ChronyConfig::UsingDefaults:0x00000000074279d8>
# /opt/puppetlabs/pdk/share/cache/ruby/2.5.0/gems/rspec-puppet-2.7.8/lib/rspec-puppet/matchers/dynamic_matchers.rb:7:in `method_missing'
# ./spec/classes/chrony_spec.rb:42:in `block (6 levels) in <top (required)>' |
|
Indeed it did. Thanks! |
I'm wondering if we should require rspec-puppet >= 2.7.9 in Gemfile. While it's part of the PDK, that makes it clear we really need that version to work. |
From slack...
|
rspec-puppet 2.7.9 has been yanked from rubygems |
2.7.9 contained rodjek/rspec-puppet#781 and that broke our tests. 2.7.9 was pulled from rubygems, but this breaking change is back in 2.8.0 :(
f5827f6
to
f3814fa
Compare
2.8.0 of rspec-puppet has been released, and contains the breaking changes originally introduced in 2.7.9, (but then reverted and yanked from rubygems). I've reopened this PR and rebased. Hopefully the fix is still the same. |
2.7.9 contains rodjek/rspec-puppet#781 and that
appears to have broken our tests. Fix was pretty simple, but not sure
the rspec-puppet PR was meant to break existing test suites like this.