Sha256: 3da7a32ce8f36f94e7058b9e8f73ce568b68d9949e6177be071567193d54c37c

Contents?: true

Size: 840 Bytes

Versions: 8

Compression:

Stored size: 840 Bytes

Contents

require 'contest'
require 'jsmin'
require 'tilt'
require 'stylus'
require 'rack/test'
require 'yaml'
require 'mocha'

require File.expand_path('../app/app.rb', __FILE__)

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

  class App < Sinatra::Base
    set :root, File.expand_path('../app', __FILE__)
    enable :raise_errors
    disable :show_exceptions
  end

  def app
    Main
  end

  def d
    puts "-"*80
    puts "#{last_response.status}"
    y last_response.original_headers
    puts "-"*80
    puts ""
    puts last_response.body.gsub(/^/m, '    ')
    puts ""
  end

  def body
    last_response.body.strip
  end

  def r(*a)
    File.join app.root, *a
  end

  def assert_includes(haystack, needle)
    assert haystack.include?(needle), "Expected #{haystack.inspect} to include #{needle.inspect}."
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
sinatra-assetpack-0.1.1 test/test_helper.rb
sinatra-assetpack-0.1.0 test/test_helper.rb
sinatra-assetpack-flexible-compression-0.0.1 test/test_helper.rb
sundawg-sinatra-assetpack-fork-0.0.12.pre1 test/test_helper.rb
sinatra-assetpack-0.0.12.pre1 test/test_helper.rb
sinatra-assetpack-0.0.11 test/test_helper.rb
sinatra-assetpack-0.0.10 test/test_helper.rb
sinatra-assetpack-0.0.9 test/test_helper.rb