Hi Pat,
Based on the backtrace from the error I'm seeing with after_commit >
1.2, I suspect the same root cause is at play here. However, it seems
worth posting just in case anyone else is struggling with this.
I'm seeing an error when running specs for my application, with the
following backtrace (and error message):
mark@marklx:~/source/aspen$ spec spec/models/sender/
sender_type_spec.rb -b
F.....
1)
NoMethodError in 'SenderType validation should create a new type with
valid options'
You have a nil object when you didn't expect
it!
You might have expected an instance of
Array.
The error occurred while evaluating nil.
+
/usr/lib/ruby/gems/1.8/gems/after_commit-1.0.4/lib/after_commit/
connection_adapters.rb:157:in `increment_transaction_pointer'
/usr/lib/ruby/gems/1.8/gems/after_commit-1.0.4/lib/after_commit/
connection_adapters.rb:11:in `commit_db_transaction'
The interesting thing is that after the first example in the spec, all
the other examples pass. This can be repeated across multiple specs;
first example in the first spec fails, everything else passes.
Mark