spec/unit/berkshelf/init_generator_spec.rb in berkshelf-6.3.3 vs spec/unit/berkshelf/init_generator_spec.rb in berkshelf-6.3.4
- old
+ new
@@ -4,9 +4,12 @@
let(:target) { tmp_path.join("some_cookbook") }
let(:resolver) { double("resolver") }
let(:kitchen_generator) { double("kitchen-generator", invoke_all: nil) }
before do
+ if defined?(Kitchen::Generator::Init)
+ allow(Kitchen::Generator::Init).to receive(:new).with(any_args()).and_return(kitchen_generator)
+ end
FileUtils.mkdir_p(target)
File.open(File.join(target, "metadata.rb"), "w") do |f|
f.write("name 'some_cookbook'")
end
end