Permalink
Browse files

Add spec for fingerprinted paths

  • Loading branch information...
1 parent 4027554 commit f4f8bfc72096d234be3552a76239c323ffd3f186 @fphilipe fphilipe committed Feb 27, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 spec/premailer-rails3/css_helper_spec.rb
@@ -129,6 +129,17 @@ def css_for_doc(doc)
load_css_at_path('http://example.com/assets/base.css') \
.should == 'content of base.css'
end
+
+ it 'should return same file when path contains file fingerprint' do
+ Rails.application.assets \
+ .expects(:find_asset) \
+ .with('base.css') \
+ .returns(mock(:to_s => 'content of base.css'))
+
+ load_css_at_path(
+ 'http://example.com/assets/base-089e35bd5d84297b8d31ad552e433275.css'
+ ).should == 'content of base.css'
+ end
end
context 'when static stylesheets are used' do

0 comments on commit f4f8bfc

Please sign in to comment.