Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A wrapper around QUnit that has a similar style to RSpec
JavaScript
tree: 3f8a672d29

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
LICENSE
README.markdown
jquery-1.4.2.min.js
qunit.css
qunit.js
specit.js
specit.tests.js
test.html

README.markdown

SpecIt

There's some RSpec in your QUnit

Let's face it: QUnit is pretty awesome, but just doesn't seem to read correctly.

I don't have the patience to write my own JS testing framework so I figured I'd piggyback off of what QUnit provides.

Examples

describe("SpecIt", function() {
  it("should match on inclusion", function() {
    [1, 2].should(include, 1, 2);
    ({one: 1, two: 2}).should(include, "one");
    "string".should(include, "str");
  });

  it("should match by type comparison", function() {
    "string".should(beA, String);
    (function() {}).should(beA, Function);
    true.should(beA, Boolean);
    ({}).should(beAn, Object);
  });
});

What's it do?

I wrote some matchers and used QUnit's module and test methods, that's all. The test file is a great form of documentation and demonstrates everything SpecIt can do currently.

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Commit, do not mess with version or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright (c) 2010 Josh Clayton. Check the LICENSE for details.

Something went wrong with that request. Please try again.