On 25/11/2008, at 8:37 AM, Pau Cor wrote:


I haven't tested that, so it is probably broken. But the point of the
regex is to match a div with the id model_attribute (change this if you
set ids with a different convention) and it should have the contents
"Token MYTOKEN".

If you do this, you are verifying what the customer actually sees, which
i _generally_ find preferable to verifying some backend thing like a
record being written to the database.


Hi Paul

I agree with you. The thing is that there is no div tag or id that I can use to identify it.

I'm not an expert at regexpr .... the output on screen is:

<p>
  <b>Token:</b>
  1f68e325fefd2cd99b91e959a033213e3875bcd5
</p>

So that was why I went with the solution I did. I guess one option is adding an id to it for testing .... but then that could be a fragile approach.

Cheers
Shane

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to