This seems like it should be real easy to do but I have not found any
documentation:

I have an image tag in a page:

<%= image_tag "arrow_green.gif", :alt => "image did not load" %>

And a functional test I would like to write:

assert_tag :tag => "img", :attributes => { :src => "arrow_green.gif" }

Of course, rails return the asset id at the end, so the test fails:

expected tag, but no tag found matching {:tag=>"img",
:attributes=>{:src=>"arrow_green.giv"}} in...


So is there a way to write a test for this? I know I can use an :alt
property and test that, but I really would rather test the :src. Any way to
get the asset id within the test so I could write:

assert_tag :tag => "img", :attributes => { :src => "arrow_green.gif" +
asset_id }

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to