i am working through the Beginning Ruby on Rails Ecommerce book and on
page 101 where it is talking about integration tests, i run
test/integration/book_test.rb and it fails giving me the following
error message:
- Failure:
test_book_administration(BookTest)
[test/integration/book_test.rb:45:inadd_book' test/integration/book_test.rb:11:in
test_book_administration’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/integration.rb:431:in
`run’]:
expected tag, but no tag found matching {:content=>“Ruby for Dummies”,
:tag=>“td”} in:
“\n<html
xmlsn=“http://www.w3.org/1999/xhtml”>\n\t\n\t\tEmporium\n\t\t<link
href=”/stylesheets/style.css?1164206463" media=“screen”
rel=“Stylesheet” type=“text/css” />\n\t\n\t\n\t\t<div
id=“header”>\n\t\t\t<h1 id=“logo”>Emporium™\n\t\t\t<h2
id=“slogan”>Books on Rails\n\t\t\n\n\t\t<div
id=“menu”>\n\t\t\t- \n\t\t\t\t
- <a
href="/admin/author">Authors | \n\t\t\t\t - <a
href="/admin/publisher">Publishers | \n\t\t\t\t - <a
href="/admin/book">Books | \n\t\t\t\t - <a
href="/">Catalog | \n\t\t\t\t - <a
href="/about">About \n\t\t\t
id=“content”>\n\t\t\t\n\t\t\t\n\t\t\t\t<div
id=“notice”>\n\t\t\t\tBook was successfully
created.\n\t\t\t\t\n\t\t\t\n\t\t\tListing
\n\n
books\n
\n\n\n \n\n\n \n \n \n\nTitle \n \nPublished at \n \nIsbn \n \nBlurb \n \nPrice \n \nCreated at \n \nUpdated at \n \n\n \n \n\nRuby for Dummies \n \nMon Dec 04 09:27:30 CST 2006 \n \n123-123-123-X \n \nThe best book released since "Eating for Dummies" \n \n40.4 \n \nMon Dec 04 09:27:30 CST 2006 \n \nMon Dec 04 09:27:30 CST 2006 \n \nShow \nEdit \nDestroy \n
\n\nNew book\n\n\t\t\n\n\t\t© 1995-2006 Emporium\n\t\n\n". is not true.looking through the code, i clearly see that “Ruby for Dummies” is in
fact in there and I also see that it is wrapped inside of “td” html
tags… so why is this test failing? i thought there might have been a
typo in my code somewhere, so i downloaded the sample code from the
site and i still got the same error message.i’m new to TDD so i’m not really sure where to start troubleshooting
this - <a