Skip to content

Commit

Permalink
Tweaks to setup of tests to get things working
Browse files Browse the repository at this point in the history
  • Loading branch information
tslocke committed Nov 11, 2011
1 parent c06ab48 commit 12b7efe
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion hobo/Rakefile
Expand Up @@ -18,7 +18,7 @@ RUBY = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']).
RUBYDOCTEST = ENV['RUBYDOCTEST'] || "#{RUBY} -S rubydoctest"

GEM_ROOT = File.expand_path('../', __FILE__)
TESTAPP_PATH = File.join Dir.tmpdir, 'hobo_testapp'
TESTAPP_PATH = ENV['TESTAPP_PATH'] || File.join(Dir.tmpdir, 'hobo_testapp')
BIN = File.expand_path('../bin/hobo', __FILE__)
require 'hobo_support/common_tasks'
include HoboSupport::CommonTasks
Expand Down
8 changes: 4 additions & 4 deletions hobo/test/doctest/hobo/multi_model_forms.rdoctest
Expand Up @@ -28,10 +28,10 @@ Contents
:host => "localhost",
:username => mysql_user,
:password => mysql_password)
>> $:.unshift File.expand_path('../../../../hobo_support/lib', __FILE__)
>> $:.unshift File.expand_path('../../../../hobo_fields/lib', __FILE__)
>> $:.unshift File.expand_path('../../../../dryml/lib', __FILE__)
>> $:.unshift File.expand_path('../../../lib', __FILE__)
>> $:.unshift File.expand_path('../../../../../hobo_support/lib', __FILE__)
>> $:.unshift File.expand_path('../../../../../hobo_fields/lib', __FILE__)
>> $:.unshift File.expand_path('../../../../../dryml/lib', __FILE__)
>> $:.unshift File.expand_path('../../../../lib', __FILE__)
>> gem 'will_paginate', ">= 3.0.pre"
>> require 'will_paginate'
>> require 'hobo'
Expand Down
9 changes: 4 additions & 5 deletions hobo/test/doctest/hobo/scopes.rdoctest
Expand Up @@ -67,16 +67,15 @@ We also need to get ActiveRecord set up with a database connection
Some load path manipulation:
{.hidden}

>> $:.unshift File.expand_path('../../../../hobo_support/lib', __FILE__)
>> $:.unshift File.expand_path('../../../../hobo_fields/lib', __FILE__)
>> $:.unshift File.expand_path('../../../../dryml/lib', __FILE__)
>> $:.unshift File.expand_path('../../../lib', __FILE__)
>> $:.unshift File.expand_path('../../../../../hobo_support/lib', __FILE__)
>> $:.unshift File.expand_path('../../../../../hobo_fields/lib', __FILE__)
>> $:.unshift File.expand_path('../../../../../dryml/lib', __FILE__)
>> $:.unshift File.expand_path('../../../../lib', __FILE__)
{.hidden}

And we'll require hobo:
{.hidden}

>> require 'will_paginate'
>> require 'hobo'
{.hidden}

Expand Down
2 changes: 1 addition & 1 deletion hobo/test/doctest/prepare_testapp.rb
@@ -1,6 +1,6 @@
require 'fileutils'
system %(rake test:prepare_testapp)
TESTAPP_PATH = '/tmp/hobo_testapp'
system %(rake test:prepare_testapp TESTAPP_PATH=#{TESTAPP_PATH})
FileUtils.chdir TESTAPP_PATH
require 'config/environment'
require 'rails/generators'
Expand Down

0 comments on commit 12b7efe

Please sign in to comment.