describe "layouts/listnav/_cloud_tenant.html.haml" do
  before :each do
    set_controller_for_view("cloud_tenant")
    assign(:panels, "ems_prop" => true, "ems_rel" => true)
    allow(view).to receive(:truncate_length).and_return(10)
    allow(view).to receive(:role_allows?).and_return(true)
  end

  let(:provider) do
    allow_any_instance_of(User).to receive(:get_timezone).and_return(Time.zone)
    FactoryGirl.create(:ems_openstack)
  end

  it "link to parent cloud provider uses restful path" do
    @record = FactoryGirl.create(:cloud_tenant, :ext_management_system => provider)
    render
    expect(response).to include("Show this Cloud Tenant&#39;s parent Cloud Provider\" href=\"/ems_cloud/#{@record.ext_management_system.id}\">")
  end
end

describe "layouts/listnav/_cloud_tenant.html.haml" do
  helper(QuadiconHelper)

  before :each do
    set_controller_for_view("cloud_tenant")
    assign(:panels, "ems_prop" => true, "ems_rel" => true)
    allow(view).to receive(:truncate_length).and_return(10)
    allow(view).to receive(:role_allows?).and_return(true)
  end

  let(:provider) do
    allow_any_instance_of(User).to receive(:get_timezone).and_return(Time.zone)
    FactoryGirl.create(:ems_openstack)
  end

  it "link to parent cloud provider uses restful path" do
    @record = FactoryGirl.create(:cloud_tenant, :ext_management_system => provider)
    render
    expect(response).to include("Show this Cloud Tenant&#39;s parent Cloud Provider\" href=\"/ems_cloud/#{@record.ext_management_system.id}\">")
  end
end

Fix test that used to pass due to test contamination
Fix test that used to pass due to test contamination

Failure:

  1) layouts/listnav/_cloud_tenant.html.haml link to parent cloud provider uses restful path
     Failure/Error: = render_quadicon(@record, :mode => :icon, :size => 72, :typ => :listnav)

     ActionView::Template::Error:
       undefined method `render_quadicon' for #<#<Class:0x005616be8f3c18>:0x005616c2b4d280>
       Did you mean?  render_with_update
     # ./app/views/layouts/listnav/_cloud_tenant.html.haml:4:in `block in _app_views_layouts_listnav__cloud_tenant_html_haml__954280025865702846_47327903420340'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/helpers/capture_helper.rb:39:in `block in capture'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/helpers/capture_helper.rb:203:in `with_output_buffer'
     # /home/bdunne/.gem/ruby/2.3.1/gems/haml-4.0.7/lib/haml/helpers/action_view_xss_mods.rb:5:in `with_output_buffer_with_haml_xss'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/helpers/capture_helper.rb:39:in `capture'
     # /home/bdunne/.gem/ruby/2.3.1/gems/haml-4.0.7/lib/haml/helpers/action_view_mods.rb:52:in `capture_with_haml'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/helpers/tag_helper.rb:107:in `content_tag'
     # /home/bdunne/.gem/ruby/2.3.1/gems/haml-4.0.7/lib/haml/helpers/action_view_mods.rb:61:in `content_tag_with_haml'
     # ./app/helpers/application_helper.rb:49:in `block (2 levels) in miq_accordion_panel'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/helpers/capture_helper.rb:39:in `block in capture'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/helpers/capture_helper.rb:203:in `with_output_buffer'
     # /home/bdunne/.gem/ruby/2.3.1/gems/haml-4.0.7/lib/haml/helpers/action_view_xss_mods.rb:5:in `with_output_buffer_with_haml_xss'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/helpers/capture_helper.rb:39:in `capture'
     # /home/bdunne/.gem/ruby/2.3.1/gems/haml-4.0.7/lib/haml/helpers/action_view_mods.rb:52:in `capture_with_haml'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/helpers/tag_helper.rb:107:in `content_tag'
     # /home/bdunne/.gem/ruby/2.3.1/gems/haml-4.0.7/lib/haml/helpers/action_view_mods.rb:61:in `content_tag_with_haml'
     # ./app/helpers/application_helper.rb:48:in `block in miq_accordion_panel'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/helpers/capture_helper.rb:39:in `block in capture'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/helpers/capture_helper.rb:203:in `with_output_buffer'
     # /home/bdunne/.gem/ruby/2.3.1/gems/haml-4.0.7/lib/haml/helpers/action_view_xss_mods.rb:5:in `with_output_buffer_with_haml_xss'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/helpers/capture_helper.rb:39:in `capture'
     # /home/bdunne/.gem/ruby/2.3.1/gems/haml-4.0.7/lib/haml/helpers/action_view_mods.rb:52:in `capture_with_haml'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/helpers/tag_helper.rb:107:in `content_tag'
     # /home/bdunne/.gem/ruby/2.3.1/gems/haml-4.0.7/lib/haml/helpers/action_view_mods.rb:61:in `content_tag_with_haml'
     # ./app/helpers/application_helper.rb:39:in `miq_accordion_panel'
     # ./app/views/layouts/listnav/_cloud_tenant.html.haml:3:in `_app_views_layouts_listnav__cloud_tenant_html_haml__954280025865702846_47327903420340'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/template.rb:158:in `block in render'
     # /home/bdunne/.gem/ruby/2.3.1/gems/activesupport-5.0.0.1/lib/active_support/notifications.rb:164:in `block in instrument'
     # /home/bdunne/.gem/ruby/2.3.1/gems/activesupport-5.0.0.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
     # /home/bdunne/.gem/ruby/2.3.1/gems/activesupport-5.0.0.1/lib/active_support/notifications.rb:164:in `instrument'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/template.rb:348:in `instrument'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/template.rb:156:in `render'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/renderer/abstract_renderer.rb:42:in `block in instrument'
     # /home/bdunne/.gem/ruby/2.3.1/gems/activesupport-5.0.0.1/lib/active_support/notifications.rb:164:in `block in instrument'
     # /home/bdunne/.gem/ruby/2.3.1/gems/activesupport-5.0.0.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
     # /home/bdunne/.gem/ruby/2.3.1/gems/activesupport-5.0.0.1/lib/active_support/notifications.rb:164:in `instrument'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/renderer/abstract_renderer.rb:41:in `instrument'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/renderer/template_renderer.rb:53:in `block in render_template'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/renderer/template_renderer.rb:52:in `render_template'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/renderer/template_renderer.rb:14:in `render'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/renderer/renderer.rb:42:in `render_template'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/renderer/renderer.rb:23:in `render'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/helpers/rendering_helper.rb:32:in `render'
     # /home/bdunne/.gem/ruby/2.3.1/gems/haml-4.0.7/lib/haml/helpers/action_view_mods.rb:12:in `render_with_haml'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/test_case.rb:199:in `render'
     # /home/bdunne/.gem/ruby/2.3.1/gems/actionview-5.0.0.1/lib/action_view/test_case.rb:120:in `render'
     # ./spec/views/layouts/listnav/_cloud_tenant.html.haml_spec.rb:16:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `render_quadicon' for #<#<Class:0x005616be8f3c18>:0x005616c2b4d280>
     #   Did you mean?  render_with_update
     #   ./app/views/layouts/listnav/_cloud_tenant.html.haml:4:in `block in _app_views_layouts_listnav__cloud_tenant_html_haml__954280025865702846_47327903420340'
