search for: create_from_form

Displaying 1 result from an estimated 1 matches for "create_from_form".

2007 Nov 02
1
stub calls to an instance method before it is created?
...s not look like anything have been done. Is there any other way around this? https://rubyforge.org/tracker/index.php?func=detail&aid=6791&group_id=797&atid=3152 Here is what I am doing, and why I feel I need this (maybe my design is inherently wrong) Given a model called Foo def Foo.create_from_form foo = Foo.new # Do all kinds of crazy stuff here foo.save end In my specs I want to stub the foo.save call to return true or false depending on the case, so that it doesn''t actually try and save to the DB... is there any way around this since I do not actually know the instance of t...