{"id":13744122,"url":"https://github.com/drewbourne/mockolate","last_synced_at":"2026-01-11T10:43:47.068Z","repository":{"id":680292,"uuid":"324042","full_name":"drewbourne/mockolate","owner":"drewbourne","description":"fake chocolate, mock objects and test spies for AS3","archived":false,"fork":false,"pushed_at":"2012-07-18T02:16:19.000Z","size":11949,"stargazers_count":145,"open_issues_count":27,"forks_count":27,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-11-15T15:42:09.468Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://mockolate.org/","language":"ActionScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drewbourne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-10-01T23:24:21.000Z","updated_at":"2024-11-06T01:27:49.000Z","dependencies_parsed_at":"2022-08-16T10:40:34.614Z","dependency_job_id":null,"html_url":"https://github.com/drewbourne/mockolate","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewbourne%2Fmockolate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewbourne%2Fmockolate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewbourne%2Fmockolate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewbourne%2Fmockolate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drewbourne","download_url":"https://codeload.github.com/drewbourne/mockolate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253177839,"owners_count":21866405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T05:01:03.427Z","updated_at":"2025-05-09T02:32:40.671Z","avatar_url":"https://github.com/drewbourne.png","language":"ActionScript","funding_links":[],"categories":["Frameworks"],"sub_categories":["Unit Testing"],"readme":"# Mockolate. \n# fake chocolate, mock objects and test spies. \n\n[mockolate.org](http://mockolate.org/) Documentation, examples, elaboration. \n[Drew Bourne](mailto:drew@firstbourne.com) Contact.\n\nThis tagline is probably a hint that Mockolate is most useful when testing software. Whether you are doing _test-driven-development_, _post-crunch-time fill-in-the-gaps_, or _exploratory-I-have-no-idea-what-is-going-on_ testing Mockolate can help.\n\n# Mock Objects\n\nA mock object can be used to simulate the behaviour of complex, real (non-mock) objects when using the real object would be impractical or impossible. Situations where a mock object would be useful: \n\n- When an object is slow (like a database or webservice),\n- is non-deterministic (like the current time), \n- has states that are difficult to reproduce (like network connections)\n\nThe above is mostly appropriated from [Mock Objects at Wikipedia](http://en.wikipedia.org/wiki/Mock_object). I could keep rewriting it here, but it's really quite a good read. \n\n# Test Spies\n\nIn espionage, spies infiltrate a system, recording and relaying information to their handlers. The handlers may use that information to check facts, inform others, or take action. \n\nIn testing, a Test Spy records which methods are called, which getters are got, which setters are set. The handler (typically a testcase) can then check the facts against what should or should not have happened and take action (typically an assertion). \n\n# Mockolate?\n\n- clean consistent syntax\n- expectation-based or record-replay\n- dynamically generates proxy Classes\n- supports handcoded proxy Classes\n- provides a FlexUnit 4 Rule and Runner\n- uses proven libraries, [FlexUnit 4](http://flexunit.org/), [FLoxy](http://code.google.com/p/floxy) and [Hamcrest-as3](http://github.com/drewbourne/hamcrest-as3)\n\n# Next\n\nHead over to [http://mockolate.org/](http://mockolate.org/) for documentation and examples:\n\n- [Mockolate?](http://mockolate.org/mockolate.html)\n- [Getting Mockolate](http://mockolate.org/getting_mockolate.html)\n- [Preparing and Creating](http://mockolate.org/preparing_and_creating.html)\n- [Stubbing and Mocking](http://mockolate.org/stubbing_and_mocking.html)\n- [Recoding and Replaying](http://mockolate.org/recording_and_replaying.html)\n- [Verifying and Test Spies](http://mockolate.org/verifying_and_test_spies.html)\n- [Decorating Mockolates](http://mockolate.org/decorating_mockolates.html)\n- [Limitations and Gotchas](http://mockolate.org/limitations_and_gotchas.html)\n\n## Thanks\n\nRichard Szalay with [FLoxy](http://code.google.com/p/floxy/), and Maxim Porges with [Loom](http://code.google.com/p/loom-as3/) for their work on Class proxy generation. \n\nBrian LeGros for hassling me about -mock-as3- enough that I added class proxy generation to it. Except you can ignore that project in favour of Mockolate.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrewbourne%2Fmockolate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrewbourne%2Fmockolate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrewbourne%2Fmockolate/lists"}