# encoding: utf-8 require 'spec_helper' class TestApp < Sinatra::Base register Sinatra::AssetHelpers set :manifest_path, File.expand_path('../../support/assets/manifest.json', __FILE__) get '/' do slim :index end template :layout do "html\n\tbody\n\t\t==yield\n" end template :index do "==stylesheet_tag('app.css')\n==javascript_tag('app.js')\n==image_tag('image.png')\n" end end def app TestApp.new end describe Sinatra::AssetHelpers do it "will return 200 status code" do get "/" last_response.status.must_equal 200 end it "outputs a stylesheet tag" do get '/' last_response.body.must_match(//) end it "outputs a javascript tag" do get '/' last_response.body.must_match(/