Sha256: c676e63f1a4e225d682ebd4fd4df765791bb7ba16e0a30ec61c96ce83b2f3430

Contents?: true

Size: 511 Bytes

Versions: 7

Compression:

Stored size: 511 Bytes

Contents

require File.expand_path('../test_helper', __FILE__)

class LocalFileTest < UnitTest
  class App < UnitTest::App
    register Sinatra::AssetPack

    assets {
      css :application, [ '/css/*.css' ]
    }
  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 nonexisting files)" do
    fn = App.assets.local_file_for '/images/404.jpg'
    assert fn.nil?
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
sinatra-assetpack-0.1.0 test/local_file_test.rb
sinatra-assetpack-flexible-compression-0.0.1 test/local_file_test.rb
sundawg-sinatra-assetpack-fork-0.0.12.pre1 test/local_file_test.rb
sinatra-assetpack-0.0.12.pre1 test/local_file_test.rb
sinatra-assetpack-0.0.11 test/local_file_test.rb
sinatra-assetpack-0.0.10 test/local_file_test.rb
sinatra-assetpack-0.0.9 test/local_file_test.rb