From: Matthias Kramm Date: Thu, 17 Sep 2009 12:56:37 +0000 (+0200) Subject: fixed bug in links spec X-Git-Tag: version-0-9-1~275 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=6de6c1cacd9cd62638470f74f41a288038932b33 fixed bug in links spec --- diff --git a/spec/links.spec.rb b/spec/links.spec.rb index 25e754d..35f92cc 100644 --- a/spec/links.spec.rb +++ b/spec/links.spec.rb @@ -3,7 +3,6 @@ require File.dirname(__FILE__) + '/spec_helper' 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 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 876f1d4..bb11257 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -58,7 +58,7 @@ class Area 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})"