[Ironruby-core] "can't convert Subclass_..." when isolating an interface

Charles Strahan charles.c.strahan at gmail.com
Wed Aug 4 15:45:53 EDT 2010


Hi Nieve,

I don't see anything that looks wrong.  Which version of IronRuby are you
using?

Let me know and I'll see if I can reproduce the problem.  If I can, I'll
take a stab at debugging it.


Regards,

-Charles

On Wed, Aug 4, 2010 at 4:17 AM, Nieve Gr <lists at ruby-forum.com> wrote:

> Hello all,
> I've been trying to use caricature to stub my services in my controllers
> tests, now when I try to test this code:
> public TestController(ITestService service)
> {
>    _service = service;
> }
>
> when my interface is:
> public interface ITestService
> {
>    string GetContent();
> }
>
> like so:
> s = isolate ITestService
> s.when_receiving(:get_content).return('some content')
> c = TestController.new s
>
> I get the above mentioned error (see attachment)
>
> Any ideas what I'm doing wrong?
>
> Attachments:
> http://www.ruby-forum.com/attachment/4902/error.jpg
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100804/79235b30/attachment.html>


More information about the Ironruby-core mailing list