<commit_before>JazzMoney
=======
**Run your Jasmine specs without a browser**

The Math
----------
    var jasmine = JsBdd;
    var traceMonkey = Mozilla.JsEngine;
    var johnson = Ruby + TraceMonkey;
    var envJs = JsBrowser;
    var harmony = johnson + envJs;

    var jazzMoney = jasmine + harmony;

Install
---------
Install harmony by following instructions here: [http://github.com/mynyml/harmony](http://github.com/mynyml/harmony)

Install JazzMoney
    gem install jazz_money

Using
---------

### Run Specs

To run your specs, create a file in your project (spec/javascript/run_jasmine_specs_with_jazz_money.rb would work):

    require 'rubygems'
    require 'jazz_money'

    javascript_files = [
      'public/javascripts/jquery-1.3.2.js',
      'public/javascripts/my_js_codes.js',
      'spec/javascript/spec_helper.js'
    ]

    jasmine_spec_files = [
      'spec/javascript/my_js_codes_spec.js',
    ]

    JazzMoney::Runner.new(javascript_files, jasmine_spec_files).call

You can then run this file on the command line using 'ruby'

### Execution Environment

JazzMoney sets up a single window instance, and all your specs are run within that window. If you are using
jasmine-ruby, your tests should run with little modification.

### Fixtures

If you need HTML fixtures, JazzMoney has an API for that:

   beforeEach(function() {
     JazzMoney.loadFixture("projects");
   });

In the code above, a file named 'spec/javascript/fixtures/projects.html' will be loaded and its entire contents will
be dumped into the innerHTML of the body tag of the current window. You can add directory structure underneath the top
level fixtures dir if you like.

### CSS<commit_msg>is there a way to view markdown locally?<commit_after>JazzMoney
=======
**Run your Jasmine specs without a browser**

The Math
----------
    var jasmine = JsBdd;
    var traceMonkey = Mozilla.JsEngine;
    var johnson = Ruby + TraceMonkey;
    var envJs = JsBrowser;
    var harmony = johnson + envJs;

    var jazzMoney = jasmine + harmony;

Install
---------
Install harmony by following instructions here: [http://github.com/mynyml/harmony](http://github.com/mynyml/harmony)

Install JazzMoney
    gem install jazz_money

Using
---------

### Run Specs

To run your specs, create a file in your project (spec/javascript/run_jasmine_specs_with_jazz_money.rb would work):

    require 'rubygems'
    require 'jazz_money'

    javascript_files = [
      'public/javascripts/jquery-1.3.2.js',
      'public/javascripts/my_js_codes.js',
      'spec/javascript/spec_helper.js'
    ]

    jasmine_spec_files = [
      'spec/javascript/my_js_codes_spec.js',
    ]

    JazzMoney::Runner.new(javascript_files, jasmine_spec_files).call

You can then run this file on the command line using 'ruby'

### Execution Environment

JazzMoney sets up a single window instance, and all your specs are run within that window. If you are using
jasmine-ruby, your tests should run with little modification.

### Fixtures

If you need HTML fixtures, JazzMoney has an API for that:

    beforeEach(function() {
      JazzMoney.loadFixture("projects");
    });

In the code above, a file named 'spec/javascript/fixtures/projects.html' will be loaded and its entire contents will
be dumped into the innerHTML of the body tag of the current window. You can add directory structure underneath the top
level fixtures dir if you like.

### CSS
{'fraction_non_alphanumeric': 0.09900117508813161, 'fraction_numerical': 0.0017626321974148062, 'mean_word_length': 3.4743758212877793, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '713211', 'n_tokens_mistral': 1074, 'n_tokens_neox': 1003, 'n_words': 350}