Sha256: e1cedb86da9af53ab3a612a8da4346121328349100d3892b09d616817c3f47ad

Contents?: true

Size: 622 Bytes

Versions: 250

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

250 entries across 250 versions & 1 rubygems

Version Path
chef-16.18.30-universal-mingw32 spec/unit/knife/tag_list_spec.rb
chef-16.18.30 spec/unit/knife/tag_list_spec.rb
chef-16.18.0-universal-mingw32 spec/unit/knife/tag_list_spec.rb
chef-16.18.0 spec/unit/knife/tag_list_spec.rb
chef-16.17.51-universal-mingw32 spec/unit/knife/tag_list_spec.rb
chef-16.17.51 spec/unit/knife/tag_list_spec.rb
chef-16.17.39-universal-mingw32 spec/unit/knife/tag_list_spec.rb
chef-16.17.39 spec/unit/knife/tag_list_spec.rb
chef-16.17.18-universal-mingw32 spec/unit/knife/tag_list_spec.rb
chef-16.17.18 spec/unit/knife/tag_list_spec.rb
chef-16.17.4-universal-mingw32 spec/unit/knife/tag_list_spec.rb
chef-16.17.4 spec/unit/knife/tag_list_spec.rb
chef-16.16.13-universal-mingw32 spec/unit/knife/tag_list_spec.rb
chef-16.16.13 spec/unit/knife/tag_list_spec.rb
chef-16.16.7-universal-mingw32 spec/unit/knife/tag_list_spec.rb
chef-16.16.7 spec/unit/knife/tag_list_spec.rb
chef-16.15.22-universal-mingw32 spec/unit/knife/tag_list_spec.rb
chef-16.15.22 spec/unit/knife/tag_list_spec.rb
chef-16.14.1-universal-mingw32 spec/unit/knife/tag_list_spec.rb
chef-16.14.1 spec/unit/knife/tag_list_spec.rb