我想用猴子盖一个Vagrant。
因为我不是一个Ruby的人,但我想测试一些行为,我需要一些帮助。
我需要覆盖其中的方法chef_provisioner?:path.rb
这就是我到目前为止在我的Vagrantfile顶部得到的信息:
module VagrantPlugins
module Cachier
module Cap
module Linux
module ChefFileCachePath
def self.chef_provisioner?(machine)
# patch applies here
end
end
end
end
end
end流浪汉不认得那个补丁。少了什么?这条路有可能吗?
发布于 2014-12-22 19:42:57
我能像这样把它关起来:
module VagrantPlugins
module Cachier
module Cap
module Linux
module ChefFileCachePath
def self.chef_provisioner?(machine)
# stuff
end
def self.chef_file_cache_path(machine)
# other method stuff
end
end
end
end
end
end
VagrantPlugins::Cachier::Plugin.guest_capability 'linux', 'chef_file_cache_path' do
# load the patched module
VagrantPlugins::Cachier::Cap::Linux::ChefFileCachePath
endhttps://stackoverflow.com/questions/27572392
复制相似问题