Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows custom fact requiring win32ole fails on linux #795

Open
jessereynolds opened this issue Jun 30, 2020 · 1 comment
Open

windows custom fact requiring win32ole fails on linux #795

jessereynolds opened this issue Jun 30, 2020 · 1 comment

Comments

@jessereynolds
Copy link

I have a module containing a custom fact that requires win32ole. This fails on linux.

I can fix this if I add 'win32/resolv' and 'win32ole' to the list of ruby gems to fake out the requiring of in lib/rspec-puppet/monkey_patches.rb.

Is this the best way to fix this? I can submit a PR...

@johnrogers00
Copy link

We also encountered this error, and wondered what is the best way to fix it. Currently I just create an empty ./lib/win32ole.rb file in my pdk project and it allows me to handle the require 'win32ole' statement in the fact. I am not sure if this is best practice or not, but considering we have to mock all of the method calls anyway, I was not able to find a way to mock the require 'win32ole' statement in the fact to avoid having to have the empty file on disk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants