Sha256: 2fffc237363ca8d16dfdd5c66c1d787f6ffb41c5932f66c7b2166eac05102026

Contents?: true

Size: 924 Bytes

Versions: 7

Compression:

Stored size: 924 Bytes

Contents

require 'contest'
require 'jsmin'
require 'tilt'
require 'haml'
require 'sass'
require 'stylus'
require 'stylus/tilt'
require 'rack/test'
require 'yaml'
require 'mocha/setup'

ENV['RACK_ENV'] = 'test'

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

7 entries across 7 versions & 2 rubygems

Version Path
sinatra-assetpack-0.2.2 test/test_helper.rb
sinatra-assetpack-0.2.1 test/test_helper.rb
sinatra-assetpack-0.2.0 test/test_helper.rb
sinatra-assetpack-0.1.7 test/test_helper.rb
sundawg-sinatra-assetpack-fork-0.1.6 test/test_helper.rb
sinatra-assetpack-0.1.6 test/test_helper.rb
sinatra-assetpack-0.1.5 test/test_helper.rb