From 6de6c1cacd9cd62638470f74f41a288038932b33 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Thu, 17 Sep 2009 14:56:37 +0200 Subject: [PATCH] fixed bug in links spec --- spec/links.spec.rb | 1 - spec/spec_helper.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) 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})" -- 1.7.10.4