<commit_before>What is MimicJS?
================

MimicJS is a specification framework for Javascript designed with Behaviour Driven Development (BDD) and agile in mind. Rather than simply providing the mechanics of most frameworks (such as stubbing, mocking), MimicJS allows a developer to clearly specify the behaviour of an object using its natural syntax, making their unit tests concise and easy to read.

On top of this, MimicJS provides the developer with the ability to assert the behaviour of jQuery. A developer can "mimic" the jQuery object, and any use of the object will be recorded and can be asserted in a specification.

MimicJS was conceived by azzamallow, and has the continued support of DiUS Computing Pty Ltd. Thanks guys :)

MimicJS doesn't replace other BDD frameworks
============================================
MimicJS is designed to be used in conjunction with the testing framework of your choice. Working with these frameworks, MimicJS help developers write meaningful unit tests using BDD syntax.

MimicJS currently works seamlessly with both Jasmine and ScrewUnit, though is not limited to just these frameworks.

Releases
========

* [Version 0.2](http://github.com/azzamallow/Mimic/tree/master/release/mimic-0.2.js) ([Release Notes](http://github.com/azzamallow/Mimic/tree/master/release/mimic-0.2.txt))

Mission Statement
=================

The primary goals for MimicJS:

* Bring the goodness of BDD, such as ubiquitous language and readable error messages, closer to the code base,
* Force the developer to provide function and variable names that make the specification readable, hence making the codebase more meaningful,
* Deter the use of technical grammar in the specification,
* Become the preferred specification framework for Javascript.

Technology
==========

MimicJS is built with raw Javascript and does not rely on any Javascript framework to be fully functional.

As it currently stands, MimicJS is best used in conjunction with both the ScrewUnit and Jasmine testing frameworks. For the best experience it is recommended that MimicJS is used with Jasmine or ScrewUnit, however MimicJS is not limited to these frameworks and can be used with other testing frameworks out there (such as JSSpec).

MimicJS currently works with all Webkit browsers (such as Safari and Google Chrome) and Gecko (Mozilla Firefox).

How To
======

Working examples of how to use MimicJS have been provided in the [examples](http://github.com/azzamallow/Mimic/tree/master/examples/) folder. There are more complex examples of how to use MimicJS in the [mimic-spec](http://github.com/azzamallow/Mimic/tree/master/mimic-spec/spec/javascripts/) folder.

Creating a Mimic is easy. 

Instantiate a new object and wrap it in the mimic function:

    john = mimic(new Student());

From here you can now monitor the behaviour of the object and do assertions against it:

    john.enrolInSubject('Math');
    john.should('enrolInSubject').using('Math');
    
To verify the assertion, you will need to put Mimic in the context of a testing framework, either Jasmine or ScrewUnit will be fine. MimicJS has been tailored to work with these frameworks, and hides the noisy overheads of verifying your assertions, keeping your tests as concise as possible:

    it('should allow a student to enrol in a subject, function() {
        john.enrolInSubject('Math');
        john.should('enrolInSubject').using('Math');
    });
    
You can take this further and write your specifications in BDD 'Given, When, Then, And' format. Here is the complete example:

    it('should allow a student to enrol in a subject, function() {
        aStudent = new Student();
        <commit_msg>aaron: updated readme, links were broken<commit_after>What is MimicJS?
================

MimicJS is a specification framework for Javascript designed with Behaviour Driven Development (BDD) and agile in mind. Rather than simply providing the mechanics of most frameworks (such as stubbing, mocking), MimicJS allows a developer to clearly specify the behaviour of an object using its natural syntax, making their unit tests concise and easy to read.

On top of this, MimicJS provides the developer with the ability to assert the behaviour of jQuery. A developer can "mimic" the jQuery object, and any use of the object will be recorded and can be asserted in a specification.

MimicJS was conceived by azzamallow, and has the continued support of DiUS Computing Pty Ltd. Thanks guys :)

MimicJS doesn't replace other BDD frameworks
============================================
MimicJS is designed to be used in conjunction with the testing framework of your choice. Working with these frameworks, MimicJS help developers write meaningful unit tests using BDD syntax.

MimicJS currently works seamlessly with both Jasmine and ScrewUnit, though is not limited to just these frameworks.

Releases
========

* [Version 0.2](http://github.com/azzamallow/MimicJS/tree/master/release/mimic-0.2.js) ([Release Notes](http://github.com/azzamallow/MimicJS/tree/master/release/mimic-0.2.txt))

Mission Statement
=================

The primary goals for MimicJS:

* Bring the goodness of BDD, such as ubiquitous language and readable error messages, closer to the code base,
* Force the developer to provide function and variable names that make the specification readable, hence making the codebase more meaningful,
* Deter the use of technical grammar in the specification,
* Become the preferred specification framework for Javascript.

Technology
==========

MimicJS is built with raw Javascript and does not rely on any Javascript framework to be fully functional.

As it currently stands, MimicJS is best used in conjunction with both the ScrewUnit and Jasmine testing frameworks. For the best experience it is recommended that MimicJS is used with Jasmine or ScrewUnit, however MimicJS is not limited to these frameworks and can be used with other testing frameworks out there (such as JSSpec).

MimicJS currently works with all Webkit browsers (such as Safari and Google Chrome) and Gecko (Mozilla Firefox).

How To
======

Working examples of how to use MimicJS have been provided in the [examples](http://github.com/azzamallow/MimicJS/tree/master/examples/) folder. There are more complex examples of how to use MimicJS in the [mimic-spec](http://github.com/azzamallow/MimicJS/tree/master/mimic-spec/spec/javascripts/) folder.

Creating a Mimic is easy. 

Instantiate a new object and wrap it in the mimic function:

    john = mimic(new Student());

From here you can now monitor the behaviour of the object and do assertions against it:

    john.enrolInSubject('Math');
    john.should('enrolInSubject').using('Math');
    
To verify the assertion, you will need to put Mimic in the context of a testing framework, either Jasmine or ScrewUnit will be fine. MimicJS has been tailored to work with these frameworks, and hides the noisy overheads of verifying your assertions, keeping your tests as concise as possible:

    it('should allow a student to enrol in a subject, function() {
        john.enrolInSubject('Math');
        john.should('enrolInSubject').using('Math');
    });
    
You can take this further and write your specifications in BDD 'Given, When, Then, And' format. Here is the complete example:

    it('should allow a student to enrol in a subject, function() {
        aStudent = new Student();
        
{'fraction_non_alphanumeric': 0.08150047227094859, 'fraction_numerical': 0.0016192146808797732, 'mean_word_length': 4.564564564564565, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '57076', 'n_tokens_mistral': 2018, 'n_tokens_neox': 1859, 'n_words': 975}