I’m wondering what was the reason behind writing integration tests in QUnit when RSpec is available?
The advantages of RSpec would be:
- Runs the phantomjs driver directly rather than through a shell command
- Removes the layer of abstraction on top of QUnit (really a unit testing framework)
- RSpec has a nice DSL that is easy to use. Not much ruby experience needed.
- RSpec can run single tests or groups of them (tags, etc) with options like --fail-fast
- Headless browser tests run faster
- Native output to stdout and correct exit code
- support for creating fixtures and transactional tests.
- There are already some integration specs in spec/integration
The list goes on. I’ve written complex AngularJS applications with RSpec integration tests. It’s pretty simple really.