What testing framework is used for Rails?

What unit testing framework is used for Rails?

I am reading a book (Pragmatic Programmers Agile Dev. With Rails) that shows how to run unit tests in Rails.

The book showed a set of default tests for rails (subclass Test::Unit). Is this the main testing base used by the Rails community? Do I use RSpec with a regular ruby โ€‹โ€‹and would like to use it in Rails as well (if this is not too much trouble)?

+5
source share
5 answers

Rspec is widely used on rails, and in combination with Cucumber is today one of the most widely used solutions. note that rails 3 uses rspec 2, so find rspec / rails . check out the book pragprog.com rspec and cucumber, an excellent resource written by basic commands. http://pragprog.com/titles/achbd/the-rspec-book

+10
source

There are many tools for testing rails and other web applications from various aspects. But if you are new to testing , I highly recommend that you start by exploring your own Rails testing environment before you start using other tools.

.

:

, , /. , , , , .

Rails .
http://guides.rubyonrails.org/testing.html

+18

, rspec . , . Rails Test:: Unit , , . , , , . rspec.

+2

, rspec Rails. , ( ).

+1

All Articles