Sha256: b3ad007b60c876047e114a380bf3dc8645db40be1bb22b63c8c2f33a02feae8d
Contents?: true
Size: 758 Bytes
Versions: 2
Compression:
Stored size: 758 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_with_template) view.stub(:base_image_url) view.stub(:template_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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tim-0.3.0 | spec/views/base_images_spec.rb |
tim-0.2.0 | spec/views/base_images_spec.rb |