require 'rexml/document' require 'amrita2' require 'amrita2/testsupport' include Amrita2::Filters include Amrita2::Runtime context "Attribute" do specify "set attribute" do #t = Amrita2::Template.new('
aaa
') t = Amrita2::Template.new <<-END < { :href=>"http://amrita2.rubyforge.org/", } ) do |r| r.should_be_samexml_as '
xyz
' end end specify "delete attribute" do #t = Amrita2::Template.new('
aaa
') t = Amrita2::Template.new <<-END < { :href=>"http://amrita2.rubyforge.org/", :class=>true, :body=>"Amrita" } ) do |r| r.should_be_samexml_as '
Amrita
' end t.test_with(:aaa => { :href=>"http://amrita2.rubyforge.org/", :class=>false, :body=>"Amrita" } ) do |r| r.should_be_samexml_as '
Amrita
' end t.test_with(:aaa => { :href=>"http://amrita2.rubyforge.org/", :class=>nil, :body=>"Amrita" } ) do |r| r.should_be_samexml_as '
Amrita
' end end specify "delete attribute2" do t = Amrita2::Template.new('<>') t.test_with(:style => "display: none") do |r| r.should_be_samexml_as '