Sha256: a626a155d9fdc6a418d3a35d9da6cd248c18c47d1d066b06d772563698327f25

Contents?: true

Size: 775 Bytes

Versions: 47

Compression:

Stored size: 775 Bytes

Contents

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

class CssAppTest < Test::Unit::TestCase
  include Rack::Test::Methods

  class App < Sinatra::Base
    register Sinatra::CssSupport
    serve_css '/css', :from => File.expand_path('../fixtures/css', __FILE__)
  end

  def app
    App.new
  end

  def assert_css(css)
    left  = last_response.body.gsub(/[ \r\n\t]+/m, '')
    right = css.gsub(/[ \r\n\t]+/m, '')

    assert_equal left, right

  end
  test "sass" do
    get '/css/style-sass.css'

    assert_css "body, #sass {\n  color: #333333; }\n"
  end

  test "scss" do
    get '/css/style-scss.css'

    assert_css "body, #scss {\n  color: #333333; }\n"
  end

  test "less" do
    get '/css/style-less.css'

    assert_css "body, #less { color: #333333; }\n"
  end
end

Version data entries

47 entries across 47 versions & 2 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.7.4 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.7.3 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.7.2 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.7.1 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.7.0 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.6.9 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.6.8 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.6.7 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.6.6 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.6.5 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.6.4 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.6.3 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.6.2 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.6.1 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.6.0 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.5.17 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.5.16 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.5.15 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb
classiccms-0.5.14 vendor/bundle/gems/sinatra-support-1.2.2/test/test_css.rb