Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test using mockolate 10.0 and flexunit 4.1 rc2 says proxy isn't prepared #36

Open
slackmage opened this issue Mar 1, 2011 · 3 comments

Comments

@slackmage
Copy link

slackmage commented Mar 1, 2011

No description provided.

@drewbourne
Copy link
Owner

Ian,

The rule should not run the test until the classes are prepared. Is there anything odd about the JSBridge class? Is it final, dynamic, etc? Could you include it (or at least its skeleton) so I can try to reproduce this.

Aside: When using the MockolateRule it will create the mock instances for you and verify them after the test. I have modified your example to the form I recommend (and need to document).

public class PanelOpenDelegateTest {

    [Rule]
    public var mocks:MockolateRule = new MockolateRule();

    [Mock(type="strict")]
    public var jsBridge:JSBridge;

    [Test]
    public function testPanelOpenJS() : void {

        var delegate:PanelOpenDelegate = new PanelOpenDelegate();

        mocks.mock(jsBridge).method("send").args("prOpenPanel",1,"CID");

        delegate.jsBridge = jsBridge;
        delegate.openPanelJS(1,"CID");
    }
}

cheers,
Drew

@drewbourne
Copy link
Owner

The code in this Gist passes: https://gist.github.com/851909

HTH,
Drew

@drewbourne
Copy link
Owner

Ian, did you resolve this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants