describe "Generating FBML"do
includeActionView::Helpers::TagHelperincludeFacebookHelperdefcaptureyieldenddefconcat(str, binding)
str
end
it "should create an empty element when no block is passed"do
fb_name(:uid=>123).should =='<fb:name uid="123" />'end
it "should create an element with contents when passing a block"do
fb_if_can_see(:uid=>123){'BOO!'}.should =='<fb:if-can-see uid="123">BOO!</fb:if-can-see>'end
it "should raise an exception when passing an invalid attribute"do
proc {fb_name(:bad=>'attribute')}.should raise_error
endend