Sha256: 6f9d7c85477e89ffd24b0498aed1f664a47e6aaa2a148986924c6ccfda5f78bf

Contents?: true

Size: 1.31 KB

Versions: 21

Compression:

Stored size: 1.31 KB

Contents

require File.expand_path('../../spec_helper', __FILE__)

describe MiniTest::Chef::Infections do

  include MiniTest::Chef::Infections

  def has_matchers(const, matchers)
    matchers.each { |m| const.public_instance_methods.must_include(m) }
  end

  it "needs to infect the expected Chef resources" do
    has_matchers ::Chef::Resource::Cron, [:must_exist, :wont_exist]
    has_matchers ::Chef::Resource::Directory, [:must_be_modified_after,
      :wont_be_modified_after, :must_exist, :wont_exist]
    has_matchers ::Chef::Resource::File, [:must_be_modified_after,
      :wont_be_modified_after, :must_exist, :wont_exist, :must_include,
      :wont_include, :must_match, :wont_match]
    has_matchers ::Chef::Resource::Group, [:must_exist, :wont_exist,
      :must_include, :wont_include]
    has_matchers ::Chef::Resource::Ifconfig, [:must_exist, :wont_exist]
    has_matchers ::Chef::Resource::Link, [:must_exist, :wont_exist]
    has_matchers ::Chef::Resource::Mount, [:must_be_enabled, :wont_be_enabled,
      :must_be_mounted, :wont_be_mounted]
    has_matchers ::Chef::Resource::Package, [:must_be_installed,
      :wont_be_installed]
    has_matchers ::Chef::Resource::Service, [:must_be_enabled, :wont_be_enabled,
      :must_be_running, :wont_be_running]
    has_matchers ::Chef::Resource::User, [:must_exist, :wont_exist]
  end

end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
minitest-chef-handler-1.1.0 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-1.0.3 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-1.0.2 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-1.0.1 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-1.0.0 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-0.6.9 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-0.6.8 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-0.6.7 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-0.6.6 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-0.6.5 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-0.6.4 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-0.6.3 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-0.6.2 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-0.6.1 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-0.6.0 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-0.5.4 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-0.5.3 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-0.5.2 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-0.5.1 spec/minitest-chef-handler/infections_spec.rb
minitest-chef-handler-0.5.0 spec/minitest-chef-handler/infections_spec.rb