Sha256: dedd895d071cdf255424a90a6db04c26a8d7461537d2b658eb693cf63d487581
Contents?: true
Size: 713 Bytes
Versions: 3
Compression:
Stored size: 713 Bytes
Contents
require 'spec_helper' module Tim describe "/tim/base_images/_base_image" do before(:each) do view.stub(:base_image).and_return FactoryGirl.create(:base_image) view.stub(:base_image_url) 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)["base_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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tim-0.1.2 | spec/views/base_images_spec.rb |
tim-0.1.1 | spec/views/base_images_spec.rb |
tim-0.0.1 | spec/views/base_images_spec.rb |