Sha256: dc120807b8a46603af0a117e0bde6be65006f5c755ac9217d40b30e3256824b4

Contents?: true

Size: 492 Bytes

Versions: 7

Compression:

Stored size: 492 Bytes

Contents

$:.unshift File.expand_path('../../lib', __FILE__)

require 'bunch'
require 'test/unit'
require 'mocha'
require 'shoulda-context'

# collapse whitespace and remove semicolons
def squeeze(js)
  js.tr("\n;", ' ').split.join(' ')
end

# perform a request for the given path and set @status, @headers, and @body.
def perform_request(path='/')
  env = {
    'REQUEST_METHOD' => 'GET',
    'PATH_INFO' => path
  }
  out = @app.call(env)
  @status, @headers, @body = out[0], out[1], out[2].join
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bunch-0.2.2 test/test_helper.rb
bunch-0.2.1 test/test_helper.rb
bunch-0.2.0 test/test_helper.rb
bunch-0.1.0 test/test_helper.rb
bunch-0.0.11 test/test_helper.rb
bunch-0.0.10 test/test_helper.rb
bunch-0.0.9 test/test_helper.rb