Skip to content

Commit

Permalink
Use Bundler. Move all test setup to one file.
Browse files Browse the repository at this point in the history
  • Loading branch information
norman committed Apr 28, 2012
1 parent 1bf376b commit 3d538ec
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
2 changes: 2 additions & 0 deletions Gemfile
@@ -0,0 +1,2 @@
source :rubygems
gemspec
1 change: 1 addition & 0 deletions haml.gemspec
Expand Up @@ -19,6 +19,7 @@ HAML_GEMSPEC = Gem::Specification.new do |spec|
spec.add_development_dependency 'maruku', '>= 0.5.9'
spec.add_development_dependency 'hpricot'
spec.add_development_dependency 'sass'
spec.add_development_dependency 'rails'
spec.add_development_dependency 'ruby_parser'

readmes = Dir['*'].reject{ |x| x =~ /(^|[^.a-z])[a-z]+/ || x == "TODO" }
Expand Down
18 changes: 0 additions & 18 deletions test/linked_rails.rb

This file was deleted.

21 changes: 18 additions & 3 deletions test/test_helper.rb
@@ -1,11 +1,26 @@
require 'rubygems'
require 'bundler/setup'
require 'action_pack'
require 'action_controller'
require 'action_view'

lib_dir = File.dirname(__FILE__) + '/../lib'
require File.dirname(__FILE__) + '/linked_rails'
begin
require 'rails'
class TestApp < Rails::Application
config.root = ""
end
Rails.application = TestApp

# For Rails 2.x
rescue LoadError
require 'initializer'
RAILS_ROOT = ""
end

ActionController::Base.logger = Logger.new(nil)

require 'test/unit'
require 'fileutils'
$:.unshift lib_dir unless $:.include?(lib_dir)
require 'haml'

require 'haml/template'
Expand Down

0 comments on commit 3d538ec

Please sign in to comment.