Sha256: 326c1347c8469f7413053afd232d8251a6cb9232cc7ea2a8d4682801087aaeaa

Contents?: true

Size: 774 Bytes

Versions: 19

Compression:

Stored size: 774 Bytes

Contents

require "#{File.dirname(__FILE__)}/../spec_helper"

describe Bonsai::Navigation do
  it "should respond to tree" do
    Bonsai::Navigation.should respond_to :tree
  end
  
  before do
    @tree = Bonsai::Navigation.tree
    @index = Bonsai::Page.find("index")
    @about = Bonsai::Page.find("about-us")
    @products = Bonsai::Page.find("products")
  end
  
  it "should contain 3 items" do
    @tree.should be_an_instance_of(Array)
    @tree.size.should == 3
  end
  
  it "should contain about and products" do
    @tree.should include @about
    @tree.should include @products
  end
  
  it "should not contain index" do
    @tree.should_not include @index
  end
  
  it "should be ordered" do
    @tree.first.should == @about
    @tree.last.should == @products
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
bonsai-1.4.9 spec/bonsai/navigation_spec.rb
bonsai-1.4.8 spec/bonsai/navigation_spec.rb
bonsai-1.4.7 spec/bonsai/navigation_spec.rb
bonsai-1.4.6 spec/bonsai/navigation_spec.rb
bonsai-1.4.5 spec/bonsai/navigation_spec.rb
bonsai-1.4.4 spec/bonsai/navigation_spec.rb
bonsai-1.4.3 spec/bonsai/navigation_spec.rb
bonsai-1.4.2 spec/bonsai/navigation_spec.rb
bonsai-1.4.1 spec/bonsai/navigation_spec.rb
bonsai-1.3.2 spec/bonsai/navigation_spec.rb
bonsai-1.3.1 spec/bonsai/navigation_spec.rb
bonsai-1.3.0 spec/bonsai/navigation_spec.rb
bonsai-1.2.0 spec/bonsai/navigation_spec.rb
bonsai-1.1.6 spec/bonsai/navigation_spec.rb
bonsai-1.1.5 spec/bonsai/navigation_spec.rb
bonsai-1.1.4 spec/bonsai/navigation_spec.rb
bonsai-1.1.3 spec/bonsai/navigation_spec.rb
bonsai-1.1.2 spec/bonsai/navigation_spec.rb
bonsai-1.1.1 spec/bonsai/navigation_spec.rb