Sha256: 54babb1570aec53f5a52d4e42b0bbb2e1e28e4a0810f67d1c5ee566b320311ba

Contents?: true

Size: 701 Bytes

Versions: 9

Compression:

Stored size: 701 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
RANGO_ENV = "test"
require_relative "../init.rb"

# load config.ru
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
    Project.router
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rango-0.1.1.2.5 stubs/project/content/spec/spec_helper.rb
rango-0.1.1.2.4 stubs/project/content/spec/spec_helper.rb
rango-0.1.1.2.3 stubs/project/content/spec/spec_helper.rb
rango-0.1.1.2.2 stubs/project/content/spec/spec_helper.rb
rango-0.1.1.2.1 stubs/project/content/spec/spec_helper.rb
rango-0.1.1.2 stubs/project/content/spec/spec_helper.rb
rango-0.1.1.1 stubs/project/content/spec/spec_helper.rb
rango-0.1.1 stubs/project/content/spec/spec_helper.rb
rango-0.1.0 stubs/project/content/spec/spec_helper.rb