Howto Suppress Warnings in Chefspec

Hello

I’m fairly new to Chef and ChefSpec. I’ve been writing code, etc and things have been swell.

Today I updated to the Latest ChefDK and now when I run my rspec tests I an bombarded with this warning:

WARNING: Fauxhai platform data for ubuntu 12.04 is deprecated and will be removed from a future release. A list of available platforms is available at https://github.com/chefspec/fauxhai/blob/master/PLATFORMS.md

I understand what the message means. I understand ubuntu 12 is really old and needs to “go away”, but until I’m able to remove all those systems from my datacenter I need to continue to test my cookbooks on that platform.

Ultimately my question is how can I suppress that warning? I must have spent most of my afternoon trying to find an that answer and the closest I could find is this url: https://github.com/chefspec/chefspec/issues/719

It seems that this warning is hard coded in Fauxhai: https://github.com/chefspec/fauxhai/blob/master/lib/fauxhai/mocker.rb#L84
However, you could provide your own fauxhai json (or a copy of the one fauxhai provides) without the “deprecated” parameter and use that one locally: https://github.com/chefspec/fauxhai#fixturing.

Thanks! I guess that explains why I can’t find how to suppress it - you can’t.

Thanks for the info. I’ll give it a try.