Sha256: 2a07702914d726373ae295a01fce4b61974d89df8bca1d170b92532da8a9a140

Contents?: true

Size: 524 Bytes

Versions: 1

Compression:

Stored size: 524 Bytes

Contents

require File.expand_path('../test_helper', __FILE__)

class StylusTest < UnitTest
  class App < Sinatra::Base
    set :root, File.expand_path('../app', __FILE__)
    register Sinatra::AssetPack

    assets do |a|
      a.css :a, '/css/a.css', [
        '/css/stylus.css'
      ]
    end
  end

  def app
    App
  end

  test "build" do
    Stylus.expects(:compile).returns("body{background:#f00;color:#00f;}")
    get '/css/stylus.css'
    assert body.gsub(/[ \t\r\n]/, '') == "body{background:#f00;color:#00f;}"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sinatra-assetpack-0.0.8 test/stylus_test.rb