Sha256: 4e3b28f407be065fac1e2abc37801a2b060b9a7fe838ddbb3c07229fab6919ca

Contents?: true

Size: 479 Bytes

Versions: 7

Compression:

Stored size: 479 Bytes

Contents

SPEC_DIR = File.dirname(__FILE__)
lib_path = File.expand_path("#{SPEC_DIR}/../lib")
$LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)

require 'rubygems'
require 'rack/test'

require 'happy'

module SpecHelpers
  def app
    subject
  end

  def response_for
    yield if block_given?
    last_response
  end

  def build_controller(&blk)
    Happy.route(&blk)
  end
end

RSpec.configure do |conf|
  conf.include Rack::Test::Methods
  conf.include SpecHelpers
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
happy-0.1.0.pre22 spec/spec_helper.rb
happy-0.1.0.pre21 spec/spec_helper.rb
happy-0.1.0.pre20 spec/spec_helper.rb
happy-0.1.0.pre19 spec/spec_helper.rb
happy-0.1.0.pre16 spec/spec_helper.rb
happy-0.1.0.pre15 spec/spec_helper.rb
happy-0.1.0.pre14 spec/spec_helper.rb