Displaying 1 result from an estimated 1 matches for "contsruct".
Did you mean:
construct
2010 Feb 01
3
validating both sides of a has_one relationship breaks pickle/machinist tests
...ex:
class Foo
has_one :schedule, :dependent => :destroy
validates_presence_of :schedule
class Schedule
belongs_to :foo
validates_presence_of :foo_id
this creates a circular dependency that breaks test frameworks like
pickle and machinist.
At first I was surprised a little that you can contsruct objects with
this constraint
...you can of course with "new" and "save"
...though I it sounds like the destroy will cause a problem.
http://mohammed.morsi.org/blog/taxonomy/term/29
is there a workaround for tests?
or is this a bad idea from the start?
Nevertheless, It seems t...