mardi 21 avril 2015

Correct way to test if a rails page is working

As my first baby-step into automated testing, I want to make sure all of the "GET"-type pages can be reached in the browser. My specifications also require:

  • Works with Devise log-ins (devise only provides testing for RSpec, so do I need RSpec?)

  • Has to check that the view can render. e.g, if I have <%= true = false %> in one of my views, and it bugs out when viewed in the browser, the automated test should pick this up. (It seems that RSpec doesn't support testing what is rendered in the view, so do I need capybara?)

My attempts today have required me to include RSpec, FactoryGirl, and Capybara (for checking the view). It's been a nightmare. Capybara is still not functioning.

Is this how most rails developers test?

Aucun commentaire:

Enregistrer un commentaire