4

I am working on Rails application, that also uses Backbone. I am testing the pure Rails part with Cucumber and RSpec and I'm looking for something similar to test Backbone part.

I tried to use Jasmine, but it was unsuccessful due to lack of documentation for Ruby gem. I am currently considering using external application (like RobotFramework, a tool for automatic tests I used in previous project) that uses Selenium RC, but I am not convinced it's the best way. Are there any better tools?

3 Answers 3

2

For the high level bdd integration testing stuff, iafonov is correct. cucumber, and its associated things (selenium, capybara) work great. If you don't need such human readable tests, there's also steak gem(https://github.com/cavalle/steak). I've not used it, but it seems reasonable.

If you want more unit test like behavior for your js, then I do suggest Jasmine. I've used it, and it worked great for me. I especially liked how closely it resembles the rspec syntax.

Maybe if you posted the problems you're having, we could help with that?

Sign up to request clarification or add additional context in comments.

Comments

1

Why not using cucumber + selenium or capybara-webkit for acceptance tests/bdd?

2 Comments

Seluenium is pure evil. If you can test your application with jasmine you should do it. ;)
I agree that selenium is not the best tool in the world, but you can't compare it with jasmine. These are two different things - one is for acceptance testing of the whole stack and another is a unit test framework.
0

I strongly recommend use jasmine and jasminerice gems. You can find a nice example on my blog post: http://blog.bandzarewicz.com/blog/2012/03/08/backbone-dot-js-tdd-with-jasmine-part-one-the-model

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.