describe "pdf conversion" do
convert_file "links.pdf" do
area_at(0,0,200,200).should_contain_link("http://www.swftools.org")
- area_at(0,0,200,200).should_contain_link("http://www.pdf2swf.org")
area_at(0,0,200,200).should_contain_link("http://www.quiss.org")
end
end
end
def should_contain_link(url)
links = @file.get_links(@x1,@y1,@x2,@y2)
- (links & [url]) or raise AreaError.new(self, "doesn't contain url \"#{url}\")
+ (links & [url]).empty? and raise AreaError.new(self, "doesn't contain url \"#{url}\"")
end
def to_s
"(#{@x1},#{@y1},#{@x2},#{@y2})"