Project

oojs

0.0
No commit activity in last 3 years
No release in over 3 years
This is a bundle of tools for helping you to create well organized client-side code to be run in browsers covered by tests (or specs) in an easy way.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.3.0
 Project Readme

Object-oriented JavaScript (or CoffeeScript)

This is a bundle of tools for helping you to create well organized client-side code to be run in browsers covered by tests (or specs) in an easy way.

It uses:

  • oojspec for writing specs;
  • jQuery, the excelent DOM manipulation library;
  • FakeAjaxServer for simulating AJAX requests made with jQuery. It uses Sinon.js for stubbing jQuery.ajax() calls;
  • js-modules for splitting your spec "classes" in multiple files for better maintainance;
  • jQuery BBQ: don't count on that. Currently it is there only to provide $.deparam, for helping testing params processed by plugins, like jQuery form. If you don't need it, just don't include it;
  • The Rails Asset Pipeline. Yeah, sorry if you don't use Rails, but this can still be helpful for non-Rails applications.

Installation

Add this line to your application's Gemfile:

gem 'oojs'

And then execute:

$ bundle

Usage

I intend to write an article about it soon.

For now, you'll need to create your spec helper first:

rails g oojs:spec_helper

Then, create some spec:

rails g oojs:spec shopping_cart

Finally, run your specs:

rake sandbox_assets:serve

And navigate to http://localhost:5000/ to see them passing.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Bitdeli Badge