Sha256: 7a1e0dc3c9ca437fd99f4d00db06f83fda5ffc7bbe4c1d6c6979fc127e266df6
Contents?: true
Size: 1.32 KB
Versions: 18
Compression:
Stored size: 1.32 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!(:website) { FactoryGirl.create(:website, :name => "Website")} let(:page) { FactoryGirl.create(:website_section,:website => website) } let(:blog) { FactoryGirl.create(:blog,:website => website) } let(:document) { FactoryGirl.create(:online_document_section,:website => website) } 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
18 entries across 18 versions & 1 rubygems