Testing PDF Content in Ruby
Earlier this year I decided enough was enough and I was proud to announce
of pdf-reader, my ruby library for reading PDFs.
The most common reason to read a PDF in ruby seems to be asserting they contain
the correct output in tests, so here’s how to go about it with rspec.
First install it.
Then add it to your Gemfile.
Finally, add some specs.
Running the same assertions with capybara request specs looks very similar.