Sha256: 07b89eca154a37400a478db64dcbe1a57fc845ba9279f78f3a86f96e1b57f422
Contents?: true
Size: 1.18 KB
Versions: 10
Compression:
Stored size: 1.18 KB
Contents
require 'spec_helper' describe WebsiteSection do it "can be instantiated" do WebsiteSection.new.should be_an_instance_of(WebsiteSection) end it "can be saved successfully" do WebsiteSection.create(:title => "Some Title").should be_persisted end end describe WebsiteSection, "is_section? and is_document_section?" do let(:page) { Factory.create(:website_section) } let(:blog) { Factory.create(:blog) } let(:document) { Factory.create(:online_document_section) } describe WebsiteSection, "is_section?" do it "should return true for the page" do page.is_section?.should be_true end it "should return true for the blog" do blog.is_section?.should be_true end it "should return false for the document" do document.is_section?.should be_false end end describe WebsiteSection, "is_document_section?" do it "should return true for the page" do page.is_document_section?.should be_false end it "should return true for the blog" do blog.is_document_section?.should be_false end it "should return false for the document" do document.is_document_section?.should be_true end end end
Version data entries
10 entries across 10 versions & 1 rubygems