keeganwitt / gmock

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

Non-complete property expectations should not appear in error messages #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following test should pass:

    void testNonCompletePropertyExpectation() {
        def mockLoader = mock()
        mockLoader.nonCompleteProperty
        play {}
    }

Original issue reported on code.google.com by JohnnyJianHY on 29 Nov 2008 at 3:33

GoogleCodeExporter commented 9 years ago
I'm sorry, the test should be:

    void testNonCompletePropertyExpectationsShouldNotAppearInErrorMessages() {
        def mockLoader = mock()
        mockLoader.nonCompleteProperty
        def expected = "Unexpected property getter call 'something'"
        play {
            def message = shouldFail(AssertionFailedError) {
                mockLoader.something
            }
            assertEquals expected, message
        }
    }

Original comment by JohnnyJianHY on 29 Nov 2008 at 3:39

GoogleCodeExporter commented 9 years ago

Original comment by julien.g...@gmail.com on 29 Nov 2008 at 7:15

GoogleCodeExporter commented 9 years ago
Started. But it might wait for tomorrow.

Original comment by julien.g...@gmail.com on 29 Nov 2008 at 7:17

GoogleCodeExporter commented 9 years ago

Original comment by JohnnyJianHY on 30 Nov 2008 at 4:36

GoogleCodeExporter commented 9 years ago

Original comment by julien.g...@gmail.com on 30 Nov 2008 at 1:34