Sha256: 46901099850755446b218da82ad01d14e1d4bbeeeea39a86a715450e9d9b70e1
Contents?: true
Size: 728 Bytes
Versions: 1
Compression:
Stored size: 728 Bytes
Contents
require File.expand_path('../test_helper', __FILE__) class LocalFileTest < UnitTest class App < Main assets { css :application, [ '/css/*.css' ] serve '/fonts', :from => 'app/fonts' } end test "local file for (in existing files)" do fn = App.assets.local_file_for '/images/background.jpg' assert_equal r('app/images/background.jpg'), fn end test "local file for (in existing files, custom serve path)" do fn = App.assets.local_file_for '/fonts/cantarell-regular-webfont.ttf' assert_equal r('app/fonts/cantarell-regular-webfont.ttf'), fn end test "local file for (in nonexisting files)" do fn = App.assets.local_file_for '/images/404.jpg' assert fn.nil? end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sinatra-assetpack-0.2.3 | test/local_file_test.rb |