I got the spec and controller minimally working now, here's the code
paste for both in full.
http://pastie.caboo.se/165743
still working on it, any suggestions on possible improvements would be
greatly appreciated.
2008/3/14, Oliver Barnes <[EMAIL PROTECTED]>:
> thanks, will do - I am still wrap
should have posted the code, sorry about that :)
http://pastie.caboo.se/165708
I was actually posting to :create, but hadn't added do_post() to the example :P
adding it solved this specific problem, thanks. hope the pastie helps
another newb out
2008/3/13, Shane Mingins <[EMAIL PROTECTED]>:
> A
thanks, will do - I am still wrapping my mind around mocks and stubs indeed :)
2008/3/13, Pat Maddox <[EMAIL PROTECTED]>:
> On Thu, Mar 13, 2008 at 4:55 PM, Oliver Barnes
>
> <[EMAIL PROTECTED]> wrote:
>
> > I see. I had gotten to trying the first way you suggested (haven't
> > tried the second
On Thu, Mar 13, 2008 at 4:55 PM, Oliver Barnes
<[EMAIL PROTECTED]> wrote:
> I see. I had gotten to trying the first way you suggested (haven't
> tried the second yet):
>
> it "should assign an image to the work" do
>@work.should_receive(:image=).with(@image)
> end
>
> but I go
And the other thing I am not seeing you are calling create
somewhere in the spec?
Always a good idea to post all the code :-)
Cheers
Shane
On 14/03/2008, at 12:55 PM, Oliver Barnes wrote:
> I see. I had gotten to trying the first way you suggested (haven't
> tried the second yet):
>
>
Are u stubbing Image.new and returning @image?? otherwise I think the
error is accurately complaining that it did not receive :image= with
the object that you have said.
Cheers
Shane
On 14/03/2008, at 12:55 PM, Oliver Barnes wrote:
> I see. I had gotten to trying the first way you suggested
I see. I had gotten to trying the first way you suggested (haven't
tried the second yet):
it "should assign an image to the work" do
@work.should_receive(:image=).with(@image)
end
but I got the following error:
should assign an image to the work
Mock 'Work_1002' expected :imag
On Thu, Mar 13, 2008 at 3:54 PM, Oliver Barnes
<[EMAIL PROTECTED]> wrote:
> thanks pat, it's still a good primer ;)
>
> I'm getting a better handle at it, but I'm still confused as to how to
> test assigment of associated objects. for instance, how do I test this
> (using attachment_fu)?
>
>
thanks pat, it's still a good primer ;)
I'm getting a better handle at it, but I'm still confused as to how to
test assigment of associated objects. for instance, how do I test this
(using attachment_fu)?
@work.image = @image
2008/3/11, Pat Maddox <[EMAIL PROTECTED]>:
> On Mon, Mar 10, 200
On Mon, Mar 10, 2008 at 2:01 PM, Oliver Barnes
<[EMAIL PROTECTED]> wrote:
> hello spec'ers,
>
> i'm in the hunt for guides on testing controllers with rspec, would
> you guys recommend any?
Oldie but goodie (I hope) -
http://evang.eli.st/blog/2007/9/15/easy-controller-tests-and-expressing-intent
hello spec'ers,
i'm in the hunt for guides on testing controllers with rspec, would
you guys recommend any?
thanks
Oliver
--
Oliver Azevedo Barnes
[EMAIL PROTECTED]
+55 11 9768 0193
http://www.linkedin.com/in/oliverbarnes
http://workingwithrails.com/person/4704-oliver-barnes
___
11 matches
Mail list logo