chef-boneyard/minitest-chef-handler

Test for "group" does not work on Windows

mattstratton opened this issue · 7 comments

When attempting to run the following test:

it "really hopes that the group exists" do
  group("Guests").must_exist
end

The test will fail

1) Failure:
matt-app::default#test_0003_really hopes that the group exists [C:/var/chef/minitest/matt-app/default_test.rb:20]:
Expected group 'Guests' to exist

what does group("Guests") return? if it doesn't return what you expect is a Chef issue. If it does, it's probably a bug in the must_exist assertion.

I'm having a bit of stumble here - how can I get it to return the value itself?

just do puts group("Guests") and see what it prints

I've been attempting to do `puts group("Guests")`` but still not sure exactly where it goes in the tests in order to prove it out. I'm using this with Berkshelf and vagrant and the built-in default test and helpers from Berkshelf.

default_test rb__xm-demo-cookbook_and_default_test rb__grosvenor-app_and_test_for__group__does_not_work_on_windows__issue__73__calavera_minitest-chef-handler-4

yes, it goes inside the test and you should get something in the output if it's not nil.

btm commented

This is a duplicate of #63.

btm commented

Or maybe it isn't. I don't know.