Sha256: 69448f711ca375084bf070c1855a3f2a8e9f42ee6fdeab44dcd5d6ce15b073fe

Contents?: true

Size: 589 Bytes

Versions: 112

Compression:

Stored size: 589 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
    @node.stub! :save
    @node.tags << "sadtag" << "happytag"
    Chef::Node.stub!(:load).and_return @node
  end

  describe "run" do
    it "can list tags on a node" do
      expected = %w(sadtag happytag)
      @node.tags.should == expected
      @knife.should_receive(:output).with(expected)
      @knife.run
    end
  end
end

Version data entries

112 entries across 112 versions & 2 rubygems

Version Path
chef-10.30.2 spec/unit/knife/tag_list_spec.rb
chef-10.30.2-x86-mingw32 spec/unit/knife/tag_list_spec.rb
chef-10.30.2.rc.0-x86-mingw32 spec/unit/knife/tag_list_spec.rb
chef-10.30.2.rc.0 spec/unit/knife/tag_list_spec.rb
chef-11.8.2 spec/unit/knife/tag_list_spec.rb
chef-11.8.2-x86-mingw32 spec/unit/knife/tag_list_spec.rb
chef-10.30.0.rc.2-x86-mingw32 spec/unit/knife/tag_list_spec.rb
chef-10.30.0.rc.2 spec/unit/knife/tag_list_spec.rb
chef-10.30.0.rc.1-x86-mingw32 spec/unit/knife/tag_list_spec.rb
chef-10.30.0.rc.1 spec/unit/knife/tag_list_spec.rb
chef-10.30.0.rc.0 spec/unit/knife/tag_list_spec.rb
chef-10.30.0.rc.0-x86-mingw32 spec/unit/knife/tag_list_spec.rb
chef-11.8.2.rc.0-x86-mingw32 spec/unit/knife/tag_list_spec.rb
chef-11.8.2.rc.0 spec/unit/knife/tag_list_spec.rb
chef-11.8.0-x86-mingw32 spec/unit/knife/tag_list_spec.rb
chef-11.8.0 spec/unit/knife/tag_list_spec.rb
chef-11.8.0.rc.4 spec/unit/knife/tag_list_spec.rb
chef-11.8.0.rc.4-x86-mingw32 spec/unit/knife/tag_list_spec.rb
chef-11.8.0.rc.1-x86-mingw32 spec/unit/knife/tag_list_spec.rb
chef-11.8.0.rc.1 spec/unit/knife/tag_list_spec.rb