Sha256: 2c56525e242b3b8c0aec10333d18c08cbdcff5763c567c2f8a77b1048dc6a023

Contents?: true

Size: 778 Bytes

Versions: 1

Compression:

Stored size: 778 Bytes

Contents

# encoding: utf-8

# NOTE: we don't have to require spec, webrat,
# rack/test or whatever, it's bundler job to do it

# load test environment include dependencies
RACK_ENV = "test"
require_relative "../init.rb"

require "spec"
require "webrat"
require "rack/test"

# load config.ru
require "rango/utils"
Rango::Utils.load_rackup

# webrat
Webrat.configure do |config|
  config.mode = :rack
end

# rspec
Spec::Runner.configure do |config|
  config.include Rack::Test::Methods
  config.include Webrat::Matchers

  # automigrate database
  # TODO: with this setup it runs after custom block, so
  # if you create a record, it will be destroyed immediately
  #config.before(:each) do
  #  DataMapper.auto_migrate!
  #end

  # for rack-test
  def app
    Rango::Router.app
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rango-0.2.6 stubs/stack/content/spec/spec_helper.rb