[Nitro] OG accessing manager attributes 'beneath' manager.store.ogmanager

Mark Van De Vyver mvyver at gmail.com
Sat Sep 8 07:43:54 EDT 2007


Hi,
In the context of writing a spec, I'm having trouble accessing any
attribute "below" the @manager.store.ogmanager attribute.

By below I mean in reference to the print out below.

Hopefully I'm doing something really dumb, I can print everything from
`@manager.models` down to `@manager.store.ogmanager`, but nothing
beneath that.

Specifically, for example, `pp @manager.store.options` gives an error,
see the end of the the following output (Questions follow below):

>    @config = OgSpecHelper.setup({:config_only=>true})
>    @manager = Og.start
>    Aspects.setup
>    pp @manager
>.    pp @manager.store.options

#<Og::Manager:0xb7791d48
 @models=[],
 @name=:memory,
 @options=
  {:name=>:memory,
   :user=>"",
   :dbi_driver=>:sqlite,
   :evolve_schema=>:warn,
   :password=>"",
   :called_by_og_setup=>true,
   :adapter=>:dbi},
 @store=
  #<Og::DbiAdapter:0xb7791a78
   @conn=
    #<DBI::DatabaseHandle:0xb77916e0
     @handle=#<DBI::DBD::SQLite::Database:0xb7791730>,
     @trace_mode=2,
     @trace_output=#<IO:0xb7f03018>>,
   @ogmanager=#<Og::Manager:0xb7791d48 ...>,
   @options=
    {:name=>:memory,
     :user=>"",
     :dbi_driver=>:sqlite,
     :evolve_schema=>:warn,
     :password=>"",
     :called_by_og_setup=>true,
     :adapter=>:dbi},
   @transaction_nesting=0,
   @typemap=
    {Fixnum=>"integer",
     Time=>"timestamp",
     Float=>"float",
     Integer=>"integer",
     Date=>"date",
     TrueClass=>"boolean",
     Hash=>"text",
     Og::Blob=>"bytea",
     Object=>"text",
     String=>"text",
     Array=>"text"}>,
 @store_class=Og::DbiAdapter>
NoMethodError in 'A default connection to a new Og store manager before(:all)'
undefined method `options' for #<Og::DbiAdapter:0xb7833864>

Is this expected behavior?
If not, any suggestions about what might be causing this?

Mark


More information about the Nitro-general mailing list