This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

dry up the application's initialization

  • Loading branch information...
dmathieu committed Mar 4, 2010
1 parent 980786e commit 09374b554640a6c1343fc20358a2758fe4fe76d4
Showing with 16 additions and 19 deletions.
  1. +1 −15 config.ru
  2. +13 −0 init.rb
  3. +2 −4 spec/spec_helper.rb
View
@@ -1,20 +1,6 @@
#!/usr/bin/env ruby
require 'logger'
-
-# We require the bundled gems
-begin
- require File.expand_path('../.bundle/environment', __FILE__)
-rescue LoadError
- require "rubygems"
- require "bundler"
- Bundler.setup
-end
-
-
-# We require the application
-$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/lib')
-require 'jesus/server'
-require 'jesus/config'
+require 'init'
# We start the server
use Rack::ShowExceptions
View
13 init.rb
@@ -0,0 +1,13 @@
+# We require the bundled gems
+begin
+ require File.expand_path('../.bundle/environment', __FILE__)
+rescue LoadError
+ require "rubygems"
+ require "bundler"
+ Bundler.setup
+end
+
+# We require the application
+$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/lib')
+require 'jesus/server'
+require 'jesus/config'
View
@@ -1,13 +1,11 @@
-require 'sinatra'
+require 'init'
+
require 'rack/test'
require 'spec'
require 'mocha'
require 'spec/autorun'
require 'spec/interop/test'
-$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
-require 'jesus/server'
-
# set test environment
set :environment, :test
set :run, false

0 comments on commit 09374b5

Please sign in to comment.