Skip to content

Instantly share code, notes, and snippets.

@jameswnl
Last active February 8, 2019 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jameswnl/c9ed7c600b1ebdac106de0fb2492ee7e to your computer and use it in GitHub Desktop.
Save jameswnl/c9ed7c600b1ebdac106de0fb2492ee7e to your computer and use it in GitHub Desktop.
spec stub method
require "MiqSshUtil"
describe ConversionHost do
let(:apst) { FactoryBot.create(:service_template_ansible_playbook) }
let(:host) { FactoryBot.create(:host) }
let(:vm) { FactoryBot.create(:vm_or_template) }
before do
allow(vm).to receive(:supports_conversion_host?).and_return(true)
allow(host).to receive(:supports_conversion_host?).and_return(true)
end
context "provider independent methods" do
let(:conversion_host_1) { FactoryBot.create(:conversion_host, :resource => host) }
let(:conversion_host_2) { FactoryBot.create(:conversion_host, :resource => vm) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment