require 'support/integration_helper' require 'chef/knife/list_essentials' describe 'knife list' do extend IntegrationSupport include KnifeSupport when_the_chef_server "is empty" do it "knife list / returns all top level directories" do knife('list /').should_succeed < '' } cookbook 'cookbook2', '1.0.1', { 'metadata.rb' => '', 'recipes' => { 'default.rb' => '' } } data_bag 'bag1', { 'item1' => {}, 'item2' => {} } data_bag 'bag2', { 'item1' => {}, 'item2' => {} } environment 'environment1', {} environment 'environment2', {} node 'node1', {} node 'node2', {} role 'role1', {} role 'role2', {} user 'user1', {} user 'user2', {} it "knife list / returns all top level directories" do knife('list /').should_succeed <