Sha256: 673c553e7ce3ccf9f5f4722f001bfa5266a7c9f9779667570b860a453de48137
Contents?: true
Size: 905 Bytes
Versions: 8
Compression:
Stored size: 905 Bytes
Contents
require File.expand_path('../test_helper', __FILE__) # tests for running sinatra-assetpack with an application that's mounted under a # subdirectory class SubpathTest < UnitTest def app Rack::URLMap.new('/subpath' => Main) end test "helpers css (mounted on a subpath, development)" do Main.settings.stubs(:environment).returns(:development) get '/subpath/helpers/css' assert body =~ %r{link rel='stylesheet' href='/subpath/css/screen.[a-f0-9]{32}.css' media='screen'} end test "helpers css (mounted on a subpath, production)" do Main.settings.stubs(:environment).returns(:production) get '/subpath/helpers/css' assert body =~ %r{link rel='stylesheet' href='/subpath/css/application.[a-f0-9]{32}.css' media='screen'} end test '/subpath/js/hello.js (plain js)' do get '/subpath/js/hello.js' assert body == '$(function() { alert("Hello"); });' end end
Version data entries
8 entries across 8 versions & 1 rubygems