Sha256: ab2901aa81a11bd3fc8d8fafacc5b78351fdf90956736c5e9e354f039433a71f
Contents?: true
Size: 1.68 KB
Versions: 1
Compression:
Stored size: 1.68 KB
Contents
# encoding: utf-8 require 'spec_helper' require 'rack/classy_assets' class MiddlewareApp < Sinatra::Base set :root, File.expand_path('../../support', __FILE__) set :public_folder, File.join(settings.root, 'public') set :sprockets, Sprockets::Environment.new(settings.root) use Rack::ClassyAssets, root: settings.root, sprockets: settings.sprockets end describe Rack::ClassyAssets do include Rack::Test::Methods def app MiddlewareApp.new 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 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
classy_assets-0.0.1 | spec/rack/classy_assets_spec.rb |