I must say that I'm also a user and lover of jasmine, all the previous lib I did was tested using Jasmine. However, I was missing some feature from RSpec (Jasmine, like Mocha, takes a big part of their syntax from RSpec), such implicit subjects, let blocks, self-describing matchers, etc.
If I were to list some of the advantages of Spectacular over Jasmine, I'll say there is:
- native nodejs support: Jasmine was primarily intended for browsers, and the jasmine-node module isn't guaranteed to use the latest jasmine version.
- subject, auto-subject describe and implicit subject in test. This is quite handy and when combined with CoffeeScript syntax it leads to very readable tests
- first class async support: asynchronous tests aren't just an edge case, but are at the root of the framework. Even matchers can be asynchronous, allowing to write matchers such as the shoulda's have_db_column matcher, that, in a javascript context, will have to rely on asynchronous API.
- built-in factories in FactoryGirl fashion.
- tests randomization
- tests dependencies
- out-of-the-box phantomjs and slimerjs support
As a last word I want to say that, at the beginning of this project, the idea was to see how I could build a BDD/TDD framework using BDD/TDD, and, as a RSpec user, I wanted to have the same kind of feeling that I can have when I write RSpec tests: simplicity, readability, reusability, etc. In the end it grew as something that could benefit others and so I pushed the development further in order to provides a full and robust framework.
If I were to list some of the advantages of Spectacular over Jasmine, I'll say there is:
- native nodejs support: Jasmine was primarily intended for browsers, and the jasmine-node module isn't guaranteed to use the latest jasmine version.
- subject, auto-subject describe and implicit subject in test. This is quite handy and when combined with CoffeeScript syntax it leads to very readable tests
- first class async support: asynchronous tests aren't just an edge case, but are at the root of the framework. Even matchers can be asynchronous, allowing to write matchers such as the shoulda's have_db_column matcher, that, in a javascript context, will have to rely on asynchronous API.
- built-in factories in FactoryGirl fashion.
- tests randomization
- tests dependencies
- out-of-the-box phantomjs and slimerjs support
As a last word I want to say that, at the beginning of this project, the idea was to see how I could build a BDD/TDD framework using BDD/TDD, and, as a RSpec user, I wanted to have the same kind of feeling that I can have when I write RSpec tests: simplicity, readability, reusability, etc. In the end it grew as something that could benefit others and so I pushed the development further in order to provides a full and robust framework.