Sha256: a88fa629a23750a763f8240080f642f81a494072ea771b365c8800efd67a8b2b
Contents?: true
Size: 702 Bytes
Versions: 29
Compression:
Stored size: 702 Bytes
Contents
require 'spec_helper' describe "Templates class" do it "should provide method access to each template" do SitemapGenerator::Templates::FILES.each do |name, file| SitemapGenerator.templates.send(name).should_not be(nil) SitemapGenerator.templates.send(name).should == File.read(File.join(SitemapGenerator.root, 'templates', file)) end end describe "templates" do before :each do SitemapGenerator.templates.sitemap_sample = nil File.expects(:read).returns('read file') end it "should only be read once" do File.expects(:read).once SitemapGenerator.templates.sitemap_sample SitemapGenerator.templates.sitemap_sample end end end
Version data entries
29 entries across 29 versions & 3 rubygems