Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 707285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:15:38+00:00 2026-05-14T04:15:38+00:00

Disclaimer: I have not used RoR, and I have not generated tests. But, I

  • 0

Disclaimer: I have not used RoR, and I have not generated tests. But, I will still dare to post this question.

Quality Assurance is theoretically impossible to get 100% right in general (Undecidable problem ;), and it is hard in practice.

So many developers do not understand that writing good automated tests is an art, and it is hard.

When I hear that RoR generates the tests for you, I get very skeptical. It cannot be that easy.

Testing is a general concept; it applies across languages. So does the concept of code contracts, it is similar for languages that support it. Code contracts do not generate themselves. The programmer must add the requirements and the promises manually, after doing some thinking about the algorithm / function. If a human gets it wrong, then the tools will propagate the error. Similarly with testing – it takes human judgement about what should happen. Tests do not write themselves, and we are far from the day when a business analyst can just have a conversation with a computer and tell it informally what the requirements are and have the computer do all the work.

There is no magic … how can RoR generate good tests for you?

Please shed some light on this. Opinions are ok, for this is a community wiki. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:15:38+00:00Added an answer on May 14, 2026 at 4:15 am

    Where have you read that Rails generates tests? It doesn’t. What it generates is a simple default test stub for every model or controller that you create with the command line tool.

    Let’s say that you create a model for a blog post:

    script/generate model post
    

    Rails automatically generates the file:

    test/unit/post_test.rb
    

    That has the following content:

    require 'test_helper'
    
    class PostTest < ActiveSupport::TestCase
      # Replace this with your real tests.
      def test_truth
        assert true
      end
    end
    

    As you can see, the content of the test is still up to you.

    Here’s more info on Rails testing: http://guides.rubyonrails.org/testing.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Disclaimer: This is not actually a programming question, but I feel the audience on
Disclaimer: this question may not have practical value, it's more of a puzzle/curiosity question.
I have searched but have not found my answer. Disclaimer: I am brand new
(Disclaimer: I realize this is a massive wall of text, but I have done
Disclaimer : I have seen the exact questions, but have not seen any answers
Disclaimer : this is not a how to question. I would more like to
This is somewhat of a general question, but I'm sure I'm not the only
Disclaimer: I am new to python but have coded in Drupal where I used
This may seem like a stupid Question but i have two cubes being rendered
Disclaimer : I'm a c# ASP.NET developer learning RoR. Sorry if this question doesn't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.