require 'spec_helper'
describe ActionView::Helpers::AssetTagHelper, :type => :helper do
class SomeWrapperClassForUrl
def to_s
'image.png'
end
end
subject { helper }
describe :image_tag do
context 'with retina option' do
it { subject.image_tag('image.png', :retina => true).should == '
' }
it { subject.image_tag('image.some.png', :retina => true).should == '
' }
context 'with class' do
it { subject.image_tag(SomeWrapperClassForUrl.new, :retina => true).should == '
' }
end
end
context 'without retina' do
it { subject.image_tag('image.png').should == '
' }
end
end
end