Sha256: 2f707d45f8695f44c81374d0f5b19a3206e8be5b1e929155aa07ab4e627e1413
Contents?: true
Size: 928 Bytes
Versions: 7
Compression:
Stored size: 928 Bytes
Contents
describe :id do it "raises Invalid if id has invalid chars" do should.raise(Escape_Escape_Escape::Invalid) { actual do div.id('a<&a') { 'hello' } end }.message.should.match /a<&a/ end it "raises HTML_ID_Duplicate if id is used more than once" do should.raise(WWW_App::HTML_ID_Duplicate) { actual do div.id(:my_id) { '1' } div.id(:my_id) { '2' } end }.message.should.match /my_id/ end # ========================================================================== # =========== end sanitization specs ===================================== # ========================================================================== it "adds 'id' attribute: a.*(:warning)(...) { }" do target '<a id="warning" href="/there">There</a>' actual do a.id(:warning).href('/there') { "There" } end end end # === describe WWW_App.new ===
Version data entries
7 entries across 7 versions & 1 rubygems