# encoding: utf-8 require 'spec_helper' require 'rack/classy_assets' class MiddlewareApp < Sinatra::Base use Rack::ClassyAssets end def app MiddlewareApp.new end describe Rack::ClassyAssets do after do ClassyAssets::Configuration.sprockets.clear_paths end describe "stylesheets" do describe "css" do it "will respond sucessfully" do get '/assets/stylesheet.css' last_response.status.must_equal 200 end end describe "sass" do it "will respond sucessfully" do get '/assets/application.css' last_response.status.must_equal 200 end end end describe "javascripts" do describe "js" do it "will respond sucessfully" do get '/assets/javascript.js' last_response.status.must_equal 200 end end describe "coffeescript" do it "will respond sucessfully" do get '/assets/application.js' last_response.status.must_equal 200 end end end describe "images" do describe "gif" do it "will respond sucessfully" do get '/assets/image.gif' last_response.status.must_equal 200 end end describe "jpg" do it "will respond sucessfully" do get '/assets/image.jpg' last_response.status.must_equal 200 end end describe "png" do it "will respond sucessfully" do get '/assets/image.png' last_response.status.must_equal 200 end end end describe "fonts" do describe "eot" do it "will respond sucessfully" do get '/assets/font.eot' last_response.status.must_equal 200 end end describe "otf" do it "will respond sucessfully" do get '/assets/font.otf' last_response.status.must_equal 200 end end describe "svg" do it "will respond sucessfully" do get '/assets/font.svg' last_response.status.must_equal 200 end end describe "ttf" do it "will respond sucessfully" do get '/assets/font.ttf' last_response.status.must_equal 200 end end describe "woff" do it "will respond sucessfully" do get '/assets/font.woff' last_response.status.must_equal 200 end end end end