Skip to content

Commit

Permalink
fix for multi_model_forms.rdoctest
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Jan 8, 2012
1 parent 3a92e6b commit 0591c01
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions hobo/test/doctest/hobo/multi_model_forms.rdoctest
Expand Up @@ -11,30 +11,9 @@ Contents
- contents
{:toc}

>> require 'rubygems'
>> require 'active_support'
>> require 'active_record'
>> require 'action_pack'
>> require 'action_view'
>> require 'action_controller'
>> mysql_adapter = defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql'
>> mysql_user = 'root'; mysql_password = ''
>> mysql_login = "-u #{mysql_user} --password='#{mysql_password}'"
>> mysql_database = "hobo_fields_doctest"
>> system "mysqladmin #{mysql_login} --force drop #{mysql_database} 2> /dev/null"
>> system("mysqladmin #{mysql_login} create #{mysql_database}") or raise "could not create database"
>> ActiveRecord::Base.establish_connection(:adapter => mysql_adapter,
:database => mysql_database,
: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__)
>> gem 'will_paginate', ">= 3.0.pre"
>> require 'will_paginate'
>> require 'hobo'
doctest: prepare testapp environment
doctest_require: '../prepare_testapp'

>> ActiveRecord::Base.logger = ActiveSupport::BufferedLogger.new(StringIO.new(''))
>>
def migrate(renames={})
Expand Down

0 comments on commit 0591c01

Please sign in to comment.