In the Java space, JUnit is predominately used and in .NET I believe nUnit is very popular. Is a community agreed upon unit testing framework for the Ruby world?
Background: I ask because I am new to Ruby and want to practice TDD at same time as I learn Ruby. So far I've only played with Test::Unit.
RSpec is a popular BDD framework for testing Ruby/Rails applications. Depending on your project type (Ruby or Rails), use the rspec or rspec-rails gem.
For performing unit tests on Java-based applications, developers often use two frameworks: JUnit and NUnit. Developed by Erick Gamma and Kent Beck, JUnit is the preferred choice for automating unit tests for Java-based applications. It was developed with the sole intention of writing and running repeatable tests.
For most testing scenarios, Selenium Automation Testing is considered an ideal option. But, when it comes to unit testing, developers need a modern automated unit testing framework that can create automated unit test cases and quickly integrates with Selenium.
You can stick to Test::Unit
or you can have nice extensions to it using Shoulda or some cool contexts using Context.
On the other side, if you prefer BDD then you can safely stick to RSpec.
As for for acceptance testing use Cucumber .
See also What’s the most commonly used unit testing framework for different types of Ruby applications? question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With