chefspec相关内容
我的食谱的默认食谱只包括几个其他食谱。我知道我可以使用以下命令测试是否包含适当的食谱: expect(chef_run).to include_recipe 'cookbook::recipe_name 但是,当我如下所示地存根INCLUDE_Recipe调用时,这不起作用 Chef::Recipe.any_instance.stub(:include_recipe).with(
..
我发现Fauxhai可以在“节点”中模拟信息,但它不能模拟Chef :: ReservedNames :: Win32 :: Version.new。 是 解决方案 适用标准RSpec,因此 allow(Chef :: ReservedNames :: Win32 :: Version)。接收(:new).and_return(double('fake version'))或类似的
..
假设我有以下配方: install_iis: 要求'chef / win32 / version' windows_version = Chef :: ReservedNames :: Win32 :: Version.new node.set ['iis'] ['components'] = [ 'IIS-HttpErrors', 'IIS-HttpRedirect', '
..
我是厨师规范的新手,并尝试找出如何在我的食谱中使用单元测试。 我已经安装了chefdk(在不同的ubuntu实例上的v2和v3)和刀规格插件。 创建“ apache_wrapper”食谱后,我更改了下一个文件: spec / spec_helper.rb 需要'chefspec' 要求'chefspec / berkshelf' RSpec.configure do | co
..
我创建了自定义LWRP,但是当我运行 ChefSpec 单元测试时。它不知道我的LWRP操作。 这是我的资源: actions:install,:uninstall default_action:install 属性:version, :kind_of =>字符串 属性:options,:kind_of =>字符串 这是我的提供者:
..