Sha256: 86651aaac6c6843546060f0b120da4a5b828d7c4a8304b577769b3d84912b94e

Contents?: true

Size: 663 Bytes

Versions: 3

Compression:

Stored size: 663 Bytes

Contents

require 'rack/test'
require 'webrat'

class Test::Unit::TestCase
  include Rack::Test::Methods
  include Webrat::Methods
  include Webrat::Matchers
 
  Webrat.configure do |config|
    config.mode = :rack
  end 

  class << self

    def should_respond_with_compiled_css
      should "return compiled css" do
        assert_equal 200, @response.status, "status is not '#{Rack::Utils::HTTP_STATUS_CODES[200]}'"
        assert @response.headers["Content-Type"].include?(Rack::Less::MIME_TYPE), "content type is not '#{Rack::Less::MIME_TYPE}'"
        assert_equal @compiled.strip, @response.body.strip, "the compiled css is incorrect"
      end
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rack-less-2.0.2 test/app_helper.rb
rack-less-2.0.1 test/app_helper.rb
rack-less-2.0.0 test/app_helper.rb