Sha256: 8c8fb63c83176a8647ea4666adcebede7e62c59f9289096de0d35a570909b429
Contents?: true
Size: 929 Bytes
Versions: 2
Compression:
Stored size: 929 Bytes
Contents
require 'spec_helper' describe Navi::Renderers::SimpleNavigation::DynamicItems do describe 'initialization' do it 'should be an array of DynamicItem objects, passing any options' do template = double nav_item_1 = double nav_item_2 = double nav_items = [nav_item_1, nav_item_2] dynamic_item_1 = double Navi::Renderers::SimpleNavigation::DynamicItem. stub(:new).with(template, nav_item_1, extra: 'options'). and_return(dynamic_item_1) dynamic_item_2 = double Navi::Renderers::SimpleNavigation::DynamicItem. stub(:new).with(template, nav_item_2, extra: 'options'). and_return(dynamic_item_2) dynamic_items = described_class.new(template, nav_items, extra: 'options') expect(dynamic_items.size).to eq(2) expect(dynamic_items[0]).to eq(dynamic_item_1) expect(dynamic_items[1]).to eq(dynamic_item_2) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
navi-0.2.1 | spec/navi/renderers/simple_navigation/dynamic_items_spec.rb |
navi-0.2.0 | spec/navi/renderers/simple_navigation/dynamic_items_spec.rb |