5

Is there any comprehensive guides on testing rails apps. Im searching for guide that will tell me what should I test and how should I test it especially with Rspec. Lots of examples will be appreciated.

4 Answers 4

6

The RSpec Book

Testing the rails app is part of development so I'd sugest to read Ruby on Rails Tutorial, Learn Rails by Example by Michael Hartl, it has good explained testing process.

3

The Rails Guide A Guide to Testing Rails Applications is a good place to start.

It covers the default test/unit style of testing.

As suggested by @megas, the RSpec book is another place to look.

Agile Web Development with Rails is a great first book for any rails developer, covering the full process of building an application, testing it as you go.

3

Also take a look at Railscast as well.

Some episodes that talks about testing:

Episode 275: How I Test

Episode 257: Request Specs and Capybara

Episode 158: Factories not Fixtures revised or Older Episode

Episode 261: Testing JavaScript with Jasmine

1

Check out Everyday Rails Testing with RSpec. Sumner does a great job of walking you through writing tests for an entire app. The Hartl book is also a great resource.

1

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.