E
E
eldar_web2017-10-24 15:14:41
Ruby on Rails
eldar_web, 2017-10-24 15:14:41

Why test static pages on Rspec in RoR?

Here's a simple test:

visit 'static_pages/home'
expect(page).to have_content('Sample App')

Why write this when you can just open the page and see?
I'm just a beginner in testing, and would like to hear from you constructively, what is the motive for such a test.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2017-10-24
@eldar_web

As a result of code refactoring, the page can be deleted, running the test will reveal this and make it possible to quickly fix it.
With this approach, why do tests at all? After all, you can check any functionality manually.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question