.
Scenario: Log on to Titan # features/preferredAgencies.feature:4
When I submit username "xxx" and password "xxx" # features/step_def.rb:1
#<Webrat::Session:0x4cb67d6>
String
That's right folks: response_body is a String! So I told myself that somewhere it must be monkey-patched, so that
response_body.should have_selector('a', {'href' => 'mem_direct.php'}) do |element| ...
will work. In other words, there needs to be a method with a name like, #has_selector? on response_body. But my alphabetized dump "puts response_body.public_methods.sort" shows no such thing.
So how is it that response_body.should have_selector... does not break? Instead, the error is
expected the following element's content to include "Membership Directory":
(Spec::Expectations::ExpectationNotMetError)
Even worse, the value of response_body is "", even though I believe the request has succeeded (although there is no "status" method delegated to Webrat::Session, so I don't know how to examine the HTTP status).