[rspec-users] rspec and prawn

Zach Dennis zach.dennis at gmail.com
Tue Mar 10 08:43:51 EDT 2009


On Mon, Mar 9, 2009 at 11:02 PM, aa aa <lists at ruby-forum.com> wrote:
> Hi,
> I've just started using prawn but am at a bit of a loss how to create my
> view specs for it.
> For example, my normal view spec has things like
> response.should have_tag("blah")
> or
> response.body.should =~ /something/
>
> How do I do this with prawn output?

Short answer, you can't--at least not yet. PDF is not a plain text
markup language like HTML so its not a problem so easily solved. I
haven't spec'd a PDF, but when looking into it at one point I came
across PDF Reader.

http://github.com/yob/pdf-wrapper/tree

Perhaps that will help you find a starting place.


> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>



-- 
Zach Dennis
http://www.continuousthinking.com
http://www.mutuallyhuman.com


More information about the rspec-users mailing list