Skip to content

Instantly share code, notes, and snippets.

run("echo gem \\'rake\\', \\'0.8.7\\' >> Gemfile;")
run("echo group :test, :development do >> Gemfile;")
run("echo gem \\'rspec-rails\\', \\'\\>\\= 2.3.0\\' >> Gemfile;")
run("echo gem \\'capybara\\', \\'0.3.9\\' >> Gemfile;")
run("echo gem \\'database_cleaner\\' >> Gemfile;")
run("echo gem \\'cucumber-rails\\' >> Gemfile;")
run("echo gem \\'launchy\\' >> Gemfile;")
run("echo end >> Gemfile;")
run("bundle install")
@railsbridge
railsbridge / test
Created August 13, 2011 03:17
test
this is a test
export PATH=/usr/local/git/bin:/usr/local/bin/src:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:~/bin:/usr/local/pgsql/bin:$PATH
export EDITOR='mate -w'
export PAGER=most
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
# place at the top of test_helper.rb:
begin
require 'rubygems'
gem 'test-unit', '~> 2.0'
rescue Gem::LoadError
puts "Could not find Test::Unit 2.0, ignoring"
end
def self.parse(value)
date_value = nil
# java.util.GregorianCalendar[time=1251874800000,areFieldsSet=true,areAllFieldsSet=true,
lenient=true,zone=sun.util.calendar.ZoneInfo[id="US/Pacific",offset=-28800000,dstSavings=3600000,
useDaylight=true,transitions=185,lastRule=java.util.SimpleTimeZone[id=US/Pacific,offset=-28800000,
dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,
startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,
endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2009,MONTH=8,
WEEK_OF_YEAR=36,WEEK_OF_MONTH=1,DAY_OF_MONTH=2,DAY_OF_YEAR=245,DAY_OF_WEEK=4,DAY_OF_WEEK_IN_MONTH=1,
Newly installed/migrated snow leopard system; coughs and dies trying to do a simple rvm 1.8.6
install. make.error.log shows that it's croaking on readline, so I tried the solution in the FAQ
and *that* isn't working. Debug output...
Excess ~ $ rvm debug
rvm 0.0.29 (2009.09.02) [http://rvm.beginrescueend.com/]
ruby:
interpreter: "ruby"
version: "1.8.7"
Gabe da Silveira has won $100-off coupon code for any public Purple Workshops workshop from Jeff Cohen
Brendan Schwartz has won Developing Facebook Platform Applications with Rails from Mike Mangino
Dmitry Ratnikov has won Rails Rescue Handbook from Mike Gunderloy
Hugo Peixoto has won Rails Freelancing Handbook from Mike Gunderloy
Jatinder Singh has won Copy #1: Rails Test Prescriptions from Noel Rappin
Nikolay Petrachkov has won Copy #2: Rails Test Prescriptions from Noel Rappin
Morgan Schweers has won Signed copy of Ruby in Practice from Jeremy McAnally
Adam Keys has won $100 credit at Prgmr (VPS hosting) from Luke Crawford
Jatinder Singh has won Copy #1: 1yr Lighthouse (bronze) from ENTP
Elise Huard has won Copy #2: 1yr Lighthouse (bronze) from ENTP
1) Failure:
test_nil_defaults_for_not_null_columns(DefaultTest)
[./test/cases/defaults_test.rb:17:in `test_nil_defaults_for_not_null_columns'
./test/cases/defaults_test.rb:14:in `each'
./test/cases/defaults_test.rb:14:in `test_nil_defaults_for_not_null_columns'
./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `__send__'
./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `run']:
name column should be DEFAULT "".
<""> expected but was
<nil>.
* DEFERRED: CalLateContribution should reimplement CalLateContributionTest.
* DEFERRED: Contribution#execute with single lineitem with bad cc should disallow double contribution.
* DEFERRED: Contribution#execute with single lineitem with gateway error should disallow double contribution.
* DEFERRED: Contribution#execute with two lineitems one payment with bad cc should disallow double contribution.
* DEFERRED: Contribution#execute with two lineitems one payment with gateway error should disallow double contribution.
* DEFERRED: Contribution#execute two lineitems two payments with bad cc should disallow double contribution.
* DEFERRED: Contribution#execute two lineitems two payments with gateway error should disallow double contribution.
* DEFERRED: Contribution#execute two lineitems (one tip) two payments with bad cc should disallow double contribution.
* DEFERRED: Contribution#execute two lineitems (one tip) two payments with partial auth failing non-tip should disallow double contri
if belong_tos.size > 0
belong_tos = belong_tos.delete_if {|x| x == "#{@polymorphic}, " }
if belong_tos.size > 0
last_in_array_fix = belong_tos.last
last_in_array_fix = last_in_array_fix.gsub(', ','')
belong_tos.pop
belong_tos << last_in_array_fix
schema << " - belongs_to: [#{belong_tos}]\n"
end
end