Skip to content

Commit

Permalink
normalized the prepare_testapp files
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Jan 8, 2012
1 parent 2fe1db3 commit e7b3e0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions hobo/test/doctest/prepare_testapp.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
require 'fileutils'
TESTAPP_PATH = '/tmp/hobo_testapp'
require 'tmpdir'

TESTAPP_PATH = ENV['TESTAPP_PATH'] || File.join(Dir.tmpdir, 'hobo_testapp')
system %(rake test:prepare_testapp TESTAPP_PATH=#{TESTAPP_PATH})
FileUtils.chdir TESTAPP_PATH
require 'config/environment'
require "#{TESTAPP_PATH}/config/environment"
require 'rails/generators'
Rails::Generators.configure!

4 changes: 3 additions & 1 deletion hobo_fields/test/prepare_testapp.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require 'fileutils'
TESTAPP_PATH = '/tmp/hobo_fields_testapp'
require 'tmpdir'

TESTAPP_PATH = ENV['TESTAPP_PATH'] || File.join(Dir.tmpdir, 'hobo_fields_testapp')
system %(rake test:prepare_testapp TESTAPP_PATH=#{TESTAPP_PATH})
system %(echo "gem 'bluecloth'" >> #{TESTAPP_PATH}/Gemfile)
system %(echo "gem 'RedCloth'" >> #{TESTAPP_PATH}/Gemfile)
Expand Down

0 comments on commit e7b3e0d

Please sign in to comment.