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