Sha256: ef8d34a9ec1f3046d9cbe55df1efea2edbf3e9b7124167c2fc9d67f5483041d3
Contents?: true
Size: 659 Bytes
Versions: 2
Compression:
Stored size: 659 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe Page do class ConstantizedPageFactory < PageFactory::Base end before do @page = Page.new end describe ".page_factory" do it "should constantize the factory" do @page.page_factory = 'ConstantizedPageFactory' @page.page_factory.should eql(ConstantizedPageFactory) end it "should return nil if no factory is set" do @page.page_factory = nil @page.page_factory.should be_nil end it "should not blow up if the factory has gone missing" do @page.page_factory = 'BogusPageFactory' @page.page_factory.should be_nil end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
radiant-page_factory-extension-1.0.1 | spec/models/page_spec.rb |
radiant-page_factory-extension-1.0.0 | spec/models/page_spec.rb |