chef-boneyard / minitest-chef-handler

Run minitest suites after your Chef recipes to check the status of your system.
Other
163 stars 44 forks source link

Assertions not working #18

Closed jperry closed 12 years ago

jperry commented 12 years ago

Hey guys,

I'm getting undefined method for 'assert_installed'

  1) Error:
test_0001_should_install_unzip(recipe::unzip):
NoMethodError: undefined method `assert_installed' for #<#<Class:0x000000207fea48>:0x000000214c1af0>
    (eval):6:in `must_be_installed'
    /var/chef/minitest/zip/zip_test.rb:31:in `block (2 levels) in <class:ZipSpec>'

My test looks like this:

class ZipSpec < MiniTest::Chef::Spec
  include MiniTest::Chef::Resources
  include MiniTest::Chef::Assertions

  describe_recipe "zip" do
    it "should install zip" do
      package("zip").must_be_installed
    end
  end

  describe_recipe "unzip" do
    it "should install unzip" do
      package("unzip").must_be_installed
    end
  end
end

Any help would be much appreciated.

Thanks, Jay

jperry commented 12 years ago

Ignore the issue above, my chef server didn't have the includes:

include MiniTest::Chef::Resources
  include MiniTest::Chef::Assertions