- it { is_expected.to contain_file("my_pin.pref").with_content(/Explanation: foo\nPackage: \*\nPin: release a=1, n=bar, v=2, c=baz, o=foobar, l=foobaz\nPin-Priority: 10\n/) }
- it { is_expected.to contain_file("my_pin.pref").with({
- 'ensure' => 'present',
- 'path' => '/etc/apt/preferences.d/99-my_pin.pref',
- 'owner' => 'root',
- 'group' => 'root',
- 'mode' => '0644',
+ it { is_expected.to contain_apt__setting("pref-my_pin").with_content(/Explanation: foo\nPackage: \*\nPin: release a=1, n=bar, v=2, c=baz, o=foobar, l=foobaz\nPin-Priority: 10\n/) }
+ it { is_expected.to contain_apt__setting("pref-my_pin").with({
+ 'setting_type' => 'pref',
+ 'base_name' => 'my_pin',
+ 'priority' => 99,