Sha256: a27dafa41cf5e1e66d32b44d0be7e4e973e145cdb85a07b2003ca7107c00de6a

Contents?: true

Size: 954 Bytes

Versions: 2

Compression:

Stored size: 954 Bytes

Contents

#

require "spec_helper"

describe Chef::Resource::Launchd do
  @launchd = Chef::Resource::Launchd.new("io.chef.chef-client")
  let(:resource) { Chef::Resource::Launchd.new(
    "io.chef.chef-client",
    run_context
  )}

  it "should create a new Chef::Resource::Launchd" do
    expect(resource).to be_a_kind_of(Chef::Resource)
    expect(resource).to be_a_kind_of(Chef::Resource::Launchd)
  end

  it "should have a resource name of Launchd" do
    expect(resource.resource_name).to eql(:launchd)
  end

  it "should have a default action of create" do
    expect(resource.action).to eql([:create])
  end

  it "should accept enable, disable, create, and delete as actions" do
    expect { resource.action :enable }.not_to raise_error
    expect { resource.action :disable }.not_to raise_error
    expect { resource.action :create }.not_to raise_error
    expect { resource.action :delete }.not_to raise_error
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
chef-12.8.1 spec/unit/resource/launchd_spec.rb
chef-12.8.1-universal-mingw32 spec/unit/resource/launchd_spec.rb