Sha256: 9d17df09e7940646aed50abfe81468a925b3afea2069536505ca85e604e9e321
Contents?: true
Size: 788 Bytes
Versions: 5
Compression:
Stored size: 788 Bytes
Contents
require 'spec_helper' module Tim describe "/tim/target_images/_target_image" do before(:each) do view.stub(:target_image).and_return FactoryGirl.build(:target_image) [:target_image_url, :image_version_url].each do |method| view.stub(method) end end it "should render custom content partial when it is defined" do render view.should render_template(:partial => "_custom", :count => 1) Hash.from_xml(rendered)["target_image"].keys.include?("custom_content") .should == true end it "should not fail to render when a content partial is not defined" do view.controller.stub(:template_exists?).and_return false render view.should render_template(:partial => "_custom", :count => 0) end end end
Version data entries
5 entries across 5 versions & 1 rubygems