Sha256: cd123ab70c67b4417c366e9f1964f985b99ac2098a83b29ae1c5d772e3d081bd
Contents?: true
Size: 986 Bytes
Versions: 21
Compression:
Stored size: 986 Bytes
Contents
require 'spec_helper' describe Dugway::Drops::PagesDrop do let(:pages) { Dugway::Drops::PagesDrop.new(Dugway.store.pages.map { |p| Dugway::Drops::PageDrop.new(p) }) } describe "#all" do it "should return an array of all pages" do all = pages.all all.should be_an_instance_of(Array) all.size.should == 1 page = all.first page.should be_an_instance_of(Dugway::Drops::PageDrop) page.name.should == 'About Us' end end describe "#permalink" do it "should return the page by permalink" do page = pages.contact page.should be_an_instance_of(Dugway::Drops::PageDrop) page.name.should == 'Contact' end it "should return the nil for an invalid permalink" do pages.blah.should be_nil end end private def rendered_template(template, assigns={}, registers={}) Liquid::Template.parse(template).render(assigns, :registers => { :currency => Dugway.store.currency }.merge(registers)) end end
Version data entries
21 entries across 21 versions & 1 rubygems