Sha256: bec4baca82c2d3db73b660aaec7f59b8d44999bf99f608a9c6782f8be697c4bb
Contents?: true
Size: 622 Bytes
Versions: 35
Compression:
Stored size: 622 Bytes
Contents
require 'spec_helper' describe Chef::Knife::TagList do before(:each) do Chef::Config[:node_name] = "webmonkey.example.com" @knife = Chef::Knife::TagList.new @knife.name_args = [ Chef::Config[:node_name], "sadtag" ] @node = Chef::Node.new allow(@node).to receive :save @node.tags << "sadtag" << "happytag" allow(Chef::Node).to receive(:load).and_return @node end describe "run" do it "can list tags on a node" do expected = %w(sadtag happytag) expect(@node.tags).to eq(expected) expect(@knife).to receive(:output).with(expected) @knife.run end end end
Version data entries
35 entries across 35 versions & 1 rubygems