Add deprecation check for processes.list

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
This commit is contained in:
Jerry Aldrich 2019-01-12 15:50:20 -08:00
parent 3b8da7957d
commit f7e8a0c80c

View file

@ -13,7 +13,10 @@ describe 'Inspec::Resources::Processes' do
it 'verify processes resource' do
resource = MockLoader.new(:freebsd10).load_resource('processes', 'login -fp apop')
_(resource.list.length).must_equal 2 # until we deprecate
proc { resource.list.length.must_equal 2 }
.must_output nil, "[DEPRECATION] `processes.list` is deprecated. Please use `processes.entries` instead. It will be removed in version 4.0.\n"
_(resource.entries.length).must_equal 2
_(resource.entries[0].to_h).must_equal({
label: nil,