keeganwitt / gmock

Automatically exported from code.google.com/p/gmock
6 stars 2 forks source link

Partial mocking doesn't work with closures #92

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following test doesn't pass:

    void testPartialMockingWithClosure() {
        def meh = new Meh()
        ordered {
            mock(meh).doSomethingElse()
        }
        play {
            meh.doSomething()
        }
    }

And class Meh is:

class Meh {

    void doSomething() {
        ["a list"].each {
            doSomethingElse()
        }
    }

    void doSomethingElse() {
        throw new RuntimeException("Ruh oh")
    }

}

Original issue reported on code.google.com by JohnnyJianHY on 16 Sep 2009 at 9:51

GoogleCodeExporter commented 9 years ago

Original comment by JohnnyJianHY on 16 Sep 2009 at 9:55

GoogleCodeExporter commented 9 years ago
This fix was made in the trunk?  Is that going to be 0.8.4 release?  If so when 
will that be available?

Original comment by pblai...@gmail.com on 23 Jan 2014 at 7:00