Sha256: 1955d2dbd4d2ce4ab88a584ca94d47bcd31897fb56ba5a4b32e1fd87363c868c

Contents?: true

Size: 784 Bytes

Versions: 17

Compression:

Stored size: 784 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
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
dugway-0.8.1 spec/units/dugway/liquid/drops/pages_drop_spec.rb
dugway-0.8.0 spec/units/dugway/liquid/drops/pages_drop_spec.rb
dugway-0.7.1 spec/units/dugway/liquid/drops/pages_drop_spec.rb
dugway-0.7.0 spec/units/dugway/liquid/drops/pages_drop_spec.rb
dugway-0.6.7 spec/units/dugway/liquid/drops/pages_drop_spec.rb
dugway-0.6.6 spec/units/dugway/liquid/drops/pages_drop_spec.rb
dugway-0.6.5 spec/units/dugway/liquid/drops/pages_drop_spec.rb
dugway-0.6.4 spec/units/dugway/liquid/drops/pages_drop_spec.rb
dugway-0.6.3 spec/units/dugway/liquid/drops/pages_drop_spec.rb
dugway-0.6.2 spec/units/dugway/liquid/drops/pages_drop_spec.rb
dugway-0.6.1 spec/units/dugway/liquid/drops/pages_drop_spec.rb
dugway-0.6.0 spec/units/dugway/liquid/drops/pages_drop_spec.rb
dugway-0.5.9 spec/units/dugway/liquid/drops/pages_drop_spec.rb
dugway-0.5.8 spec/units/dugway/liquid/drops/pages_drop_spec.rb
dugway-0.5.7 spec/units/dugway/liquid/drops/pages_drop_spec.rb
dugway-0.5.6 spec/units/dugway/liquid/drops/pages_drop_spec.rb
dugway-0.5.4 spec/units/dugway/liquid/drops/pages_drop_spec.rb