Sha256: 545c14d67a0e577dfce99f72671511fe1f823225ab9094cdbfe349cb5c7669fd

Contents?: true

Size: 634 Bytes

Versions: 112

Compression:

Stored size: 634 Bytes

Contents

require 'spec_helper'

describe Chef::Knife::TagCreate do
  before(:each) do
    Chef::Config[:node_name] = "webmonkey.example.com"
    @knife = Chef::Knife::TagCreate.new
    @knife.name_args = [ Chef::Config[:node_name], "happytag" ]

    @node = Chef::Node.new
    @node.stub! :save
    Chef::Node.stub!(:load).and_return @node
    @stdout = StringIO.new
    @knife.ui.stub!(:stdout).and_return(@stdout)
  end

  describe "run" do
    it "can create tags on a node" do
      @knife.run
      @node.tags.should == ["happytag"]
      @stdout.string.should match /created tags happytag.+node webmonkey.example.com/i
    end
  end
end

Version data entries

112 entries across 112 versions & 2 rubygems

Version Path
chef-10.34.6-x86-mingw32 spec/unit/knife/tag_create_spec.rb
chef-10.34.6 spec/unit/knife/tag_create_spec.rb
chef-10.34.4 spec/unit/knife/tag_create_spec.rb
chef-10.34.4-x86-mingw32 spec/unit/knife/tag_create_spec.rb
chef-10.34.2-x86-mingw32 spec/unit/knife/tag_create_spec.rb
chef-10.34.2 spec/unit/knife/tag_create_spec.rb
chef-10.34.0-x86-mingw32 spec/unit/knife/tag_create_spec.rb
chef-10.34.0 spec/unit/knife/tag_create_spec.rb
chef-10.32.2-x86-mingw32 spec/unit/knife/tag_create_spec.rb
chef-10.32.2 spec/unit/knife/tag_create_spec.rb
chef-10.32.0.rc.0 spec/unit/knife/tag_create_spec.rb
chef-10.32.0.rc.0-x86-mingw32 spec/unit/knife/tag_create_spec.rb
chef-10.30.4 spec/unit/knife/tag_create_spec.rb
chef-10.30.4-x86-mingw32 spec/unit/knife/tag_create_spec.rb
chef-11.10.0.rc.0 spec/unit/knife/tag_create_spec.rb
chef-11.10.0.rc.0-x86-mingw32 spec/unit/knife/tag_create_spec.rb
chef-11.8.4.ohai7.0-x86-mingw32 spec/unit/knife/tag_create_spec.rb
chef-11.8.4.ohai7.0 spec/unit/knife/tag_create_spec.rb
chef-11.10.0.alpha.1-x86-mingw32 spec/unit/knife/tag_create_spec.rb
chef-11.10.0.alpha.1 spec/unit/knife/tag_create_spec.rb