Displaying 1 result from an estimated 1 matches for "sequel_model".
2008 May 18
0
Spec a before_destroy callback in Sequel
...migrations.each { |m| m.destroy }
end
# ...
end
The problem is isolating it from the database to test. I want to know
that when I send Changeset#destroy that each migration is destroyed.
The implementation of Sequel::Model#destroy (from the RDoc) is this:
# File sequel/lib/sequel_model/record.rb, line 325
325: def destroy
326: db.transaction do
327: before_destroy
328: delete
329: after_destroy
330: end
331: self
332: end
Now, if a database isn''t wired up, Sequel complains if you do anything
database related, and that includes using associations. So the best I
have...