jeudi 9 avril 2015

Rails test: test image_tag on view

I'm writing the view tests and i want to test an image



<%= image_tag "icon.png", class: "img-responsive" %>


So i made this test, but is not working



it 'app logo' do
render
assert_select 'img[src=?]', asset_path('icon.png')
end


What could be the problem? Is this the correct why to test it with rspec?


Aucun commentaire:

Enregistrer un commentaire