> Regarding your original problem of the mocking error, have you debugged into
> the FlexImage code? In looking at your gist, you have this:
>
> # @photo = mock_model(Photo, {:image_file_string => photo_content})
>
> which says "create a mock object based on the Photo model, and if
> #ima
On 2010-04-25 5:25 PM, Patrick J. Collins wrote:
Here is a gist of my code:
http://gist.github.com/378778
Use stub when you just want to provide the plumbing. Use should_receive when
you are setting an expectation. As an example, you could do
Photo.stub(:create) just to provide the method to a
Here is a gist of my code:
http://gist.github.com/378778
> Use stub when you just want to provide the plumbing. Use should_receive when
> you are setting an expectation. As an example, you could do
> Photo.stub(:create) just to provide the method to avoid errors when your code
> calls it. But if y
On 2010-04-25 4:25 PM, Patrick J. Collins wrote:
On Sun, 25 Apr 2010, Phillip Koebbe wrote:
See http://gist.github.com/378489 for how I ended up specing a file upload.
This isn't the exact same situation, but maybe you will get some ideas that
will help. And there may be a better way, but this
On Sun, 25 Apr 2010, Phillip Koebbe wrote:
> See http://gist.github.com/378489 for how I ended up specing a file upload.
> This isn't the exact same situation, but maybe you will get some ideas that
> will help. And there may be a better way, but this seems to work and is fairly
> easy for me unde
On 2010-04-25 3:43 AM, Patrick J. Collins wrote:
Hi everyone,
I have a test for importing vcards, and I was finding that each time it was
being run, it was generating new photos and since it was using the test
database, it was actually overwriting real photos that were being stored in the
file