Skip to content

Instantly share code, notes, and snippets.

@eastmedia
Created July 30, 2009 20:33
Show Gist options
  • Save eastmedia/158912 to your computer and use it in GitHub Desktop.
Save eastmedia/158912 to your computer and use it in GitHub Desktop.
21 describe "double tier" do
22 it "returns an nested unordered list" do
23 html = Nokogiri::HTML helper.build_new_menu(@menu_double_tier)
24 html.search('ul').size.should == 2
25 html.search('ul#navmenu-h').size.should == 1
26 html.search('ul#navmenu-h').xpath('./li').size.should == 2
27 html.search('ul#navmenu-h').xpath('./li').first.xpath('./a').text.should == 'Pages'
28 html.search('ul#navmenu-h li ul li').size.should == 1
29 html.search('ul#navmenu-h li ul li').first.text.should == 'SubPages'
30 end
31 end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment