Sha256: 59adff84cc3123deb0deb2b7db5e3ceb114eb024d6f15efa75d2b05a4138afc0
Contents?: true
Size: 677 Bytes
Versions: 7
Compression:
Stored size: 677 Bytes
Contents
# -*- encoding: utf-8 -*- require './spec/helper' describe Builder do before :all do @template = Nokogiri::HTML(File.open("data/templates/main.html")) end it "should replace a css rule by a string" do builder = Builder.new(@template) doc = builder.replace('genit.pages', "<working />") doc.css("body working").size.should == 1 end it "should set the menu" do menu = Nokogiri::XML(File.open("data/templates/menu.html")) builder = MenuBuilder.new(menu) menu = builder.build_for_page('index.html') menu.css("ul#menu a#selected").size.should == 1 menu.css("ul#menu a#selected").first['href'].should == 'index.html' end end
Version data entries
7 entries across 7 versions & 1 rubygems