[Nitro] [PATCH] glue-validations-to-og

Dimitri Aivaliotis aglarond at gmail.com
Wed Apr 12 03:18:11 EDT 2006


Hi Bryan,

On 4/12/06, Bryan Soto <bryan.a.soto at gmail.com> wrote:
> Attached patch moves all code from glue/validation.rb to og/validation.rb.

Apply the patch didn't cause any further errors for me.  Note, though,
that I already had to rename a number of files because of various
errors:

tc_inheritance.rb
tc_inheritance2.rb
tc_override.rb
tc_polymorphic.rb
tc_reverse.rb
tc_store.rb

The problems were either PostgreSQL-STI related, no 'exec' for
KirbyBase or because I don't have SQLite installed (the tests really
shouldn't assume this).  Without renaming the files, the test suite
would'nt complete.

I'm running on Linux with the latest devlab repo.  This is the top of
my CONFIG.rb:

configA = :psql

# FOR MULTI-TESTS

configB = :kirby

# SET THIS TO true TO ENABLE EXTRA DEBUG CODE

debug = true

With the file rename, both before and after the patch, I got:

  1) Error:
test_all(TC_OgAggrCalc):
NoMethodError: undefined method `to_f' for ["58"]:Array
    nitrohq/og/lib/og/store/sql.rb:532:in `calculate'
    nitrohq/og/lib/og/store/psql.rb:139:in `each_row'
    nitrohq/og/lib/og/store/psql.rb:138:in `each_row'
    nitrohq/og/lib/og/store/sql.rb:531:in `calculate'
    nitrohq/og/lib/og/entity.rb:267:in `calculate'
    nitrohq/og/lib/og/entity.rb:305:in `sum'
    ./test/og/tc_aggregations_calculations.rb:39:in `test_all'

  2) Failure:
test_all(TestMultiple) [./test/og/tc_multiple.rb:37]:
<false> is not true.

35 tests, 138 assertions, 1 failures, 1 errors


I don't have the time at the moment to follow up and fix the test
cases/libraries so that they'll all complete successfully.  I just
wanted to give some quick feedback on the patch (it works!), and
provide this info in case somebody else had time to do the follow-up.

- Dimitri




More information about the Nitro-general mailing list