Sha256: 7147dcccfd525c9012c6351a8eef7b5e3465a41983627d7923ef99ea65ff68f6
Contents?: true
Size: 815 Bytes
Versions: 7
Compression:
Stored size: 815 Bytes
Contents
require 'spec_helper' describe ActiveAdmin::Views::IndexList do describe "#index_list_renderer" do let(:index_classes) { [ActiveAdmin::Views::IndexAsTable, ActiveAdmin::Views::IndexAsBlock] } let(:helpers) do helpers = mock_action_view helpers.stub! :url_for => "/" helpers.stub!(:params).and_return({:as => "table"}) helpers end subject do render_arbre_component({:index_classes => index_classes}, helpers) do index_list_renderer(index_classes) end end its(:tag_name) { should == 'ul' } it "should contain the names of available indexes in links" do a_tags = subject.find_by_tag("a") a_tags.size.should == 2 a_tags.first.to_s.should include("Table") a_tags.last.to_s.should include("List") end end end
Version data entries
7 entries across 7 versions & 2 rubygems