Comprehensive guide on testing rails app

一笑奈何 提交于 2020-01-01 05:52:26

问题


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.


回答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.




回答2:


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.




回答4:


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



来源:https://stackoverflow.com/questions/8956816/comprehensive-guide-on-testing-rails-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!