On Sun, May 24, 2009 at 9:25 AM, Nick Hoffman <n...@deadorange.com> wrote:

>
> In KeywordListsController#create, I call the private method
> #create_keywords_and_associate, which calls AdSenseHeavenParser#parse
> .
>
> Thus, some of my specs set an expectation on AdSenseHeavenParser#parse
> . However, that expectation isn't stubbing out #parse .
>
> In the "output" section of my paste:
>    http://pastie.org/488160
> you can see that the second line is "*** create_keywords_and_associate
> ***". However, that string shouldn't be printed if
> AdSenseHeavenParser#parse is stubbed out.
>

I don't know why the AdSenseHeavenParser call isn't being stubbed, but I see
no reason why that string shouldn't be printed. You're not stubbing
create_keywords_and_associate.

I would remove the .with call to see if AdSenseHeavenParser is just
receiving different arguments than you expected.

BTW, class methods are generally indicated with a .; instance methods with a
#.

///ark
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to