I'm going through Michael Hartl's Rails tutorial, and I am happy to report
that (as of the end of section 7) I'm able to get things working. (That
said, I skipped the section on automated testing, as Hartl warned that
automated testing is the most likely part of his book to become outdated.)

There is a heavy emphasis on the "bundle exec rspec spec" tests. I agree
that testing is a very necessary part of development. As I go through the
rest of this tutorial, I will continue to test when instructed.

That said, how essential are the "bundle exec rspec spec" tests in most
real world apps? My reasons for possibly not using them or not using them
as thoroughly as the tutorial does:
1. I still feel more comfortable testing by accessing my web site in the
browser and trying things out as if I were one of my users.
2. Creating the tests does add to the workload.
3. Garbage in -> garbage out: If you don't write the proper tests, your
results don't matter but could cause you to needlessly obsess over
something that actually works but you erroneously think is in error, or you
could think something works when it doesn't.

After I finish railstutorial.org, I will start my first Ruby on Rails web
site, which will profile mutual funds and ETFs. How important is it that I
do the "bundle exec rspec spec" testing as thoroughly as the tutorial does?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/QAY7xmnJg3EJ.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Matthew Witek at Mar 16, 2013 at 4:25 am
    testing is important for when you try to introduce new features down the road or if you plan on refactoring your code. Its nice to have test that lets you know you didn't break stuff. Imagine making a change and having to check every page in your app… not fun and time consuming. If you are making a small site, personal blog or something then yeah, don't worry about it but if you plan on having user that use your product and you plan on introducing new feature to your project then test everything. It only helps :)

    Matt
    On Mar 16, 2013, at 12:21 AM, "Jason Hsu, Android developer" wrote:

    I'm going through Michael Hartl's Rails tutorial, and I am happy to report that (as of the end of section 7) I'm able to get things working. (That said, I skipped the section on automated testing, as Hartl warned that automated testing is the most likely part of his book to become outdated.)

    There is a heavy emphasis on the "bundle exec rspec spec" tests. I agree that testing is a very necessary part of development. As I go through the rest of this tutorial, I will continue to test when instructed.

    That said, how essential are the "bundle exec rspec spec" tests in most real world apps? My reasons for possibly not using them or not using them as thoroughly as the tutorial does:
    1. I still feel more comfortable testing by accessing my web site in the browser and trying things out as if I were one of my users.
    2. Creating the tests does add to the workload.
    3. Garbage in -> garbage out: If you don't write the proper tests, your results don't matter but could cause you to needlessly obsess over something that actually works but you erroneously think is in error, or you could think something works when it doesn't.

    After I finish railstutorial.org, I will start my first Ruby on Rails web site, which will profile mutual funds and ETFs. How important is it that I do the "bundle exec rspec spec" testing as thoroughly as the tutorial does?

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/QAY7xmnJg3EJ.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Colin Law at Mar 16, 2013 at 9:26 am

    On 16 March 2013 04:21, Jason Hsu, Android developer wrote:
    I'm going through Michael Hartl's Rails tutorial, and I am happy to report
    that (as of the end of section 7) I'm able to get things working. (That
    said, I skipped the section on automated testing, as Hartl warned that
    automated testing is the most likely part of his book to become outdated.)
    Don't skip it. The fact that the details may change does not alter
    the fact that testing is critical. The tutorial will give you the
    basics even if the details change over the years.
    There is a heavy emphasis on the "bundle exec rspec spec" tests. I agree
    that testing is a very necessary part of development. As I go through the
    rest of this tutorial, I will continue to test when instructed.

    That said, how essential are the "bundle exec rspec spec" tests in most real
    world apps? My reasons for possibly not using them or not using them as
    thoroughly as the tutorial does:
    1. I still feel more comfortable testing by accessing my web site in the
    browser and trying things out as if I were one of my users.
    That is ok when your site has 5 pages. What about when it has 100?
    Are you going to manually test everything every time you make a
    change.
    2. Creating the tests does add to the workload.
    Only in the short term. In the long term it will pay for itself.
    3. Garbage in -> garbage out: If you don't write the proper tests, your
    results don't matter but could cause you to needlessly obsess over something
    that actually works but you erroneously think is in error, or you could
    think something works when it doesn't.
    Obviously true. That just means that you have to do your best to
    design the tests well.
    After I finish railstutorial.org, I will start my first Ruby on Rails web
    site, which will profile mutual funds and ETFs. How important is it that I
    do the "bundle exec rspec spec" testing as thoroughly as the tutorial does?
    Vitally important. Apart from anything else it will allow you to
    sleep at night being reasonably confident that the change you made to
    the site today will not have messed up some other aspect of the site
    that you had not considered, so you will not wake up to an inbox full
    of messages from irate customers complaining.

    Colin

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Tamouse at Mar 16, 2013 at 7:58 pm

    On Sat, Mar 16, 2013 at 4:26 AM, Colin Law wrote:
    On 16 March 2013 04:21, Jason Hsu, Android developer
    wrote:
    I'm going through Michael Hartl's Rails tutorial, and I am happy to report
    that (as of the end of section 7) I'm able to get things working. (That
    said, I skipped the section on automated testing, as Hartl warned that
    automated testing is the most likely part of his book to become outdated.)
    Don't skip it. The fact that the details may change does not alter
    the fact that testing is critical. The tutorial will give you the
    basics even if the details change over the years.
    There is a heavy emphasis on the "bundle exec rspec spec" tests. I agree
    that testing is a very necessary part of development. As I go through the
    rest of this tutorial, I will continue to test when instructed.

    That said, how essential are the "bundle exec rspec spec" tests in most real
    world apps? My reasons for possibly not using them or not using them as
    thoroughly as the tutorial does:
    1. I still feel more comfortable testing by accessing my web site in the
    browser and trying things out as if I were one of my users.
    That is ok when your site has 5 pages. What about when it has 100?
    Are you going to manually test everything every time you make a
    change.
    2. Creating the tests does add to the workload.
    Only in the short term. In the long term it will pay for itself.
    3. Garbage in -> garbage out: If you don't write the proper tests, your
    results don't matter but could cause you to needlessly obsess over something
    that actually works but you erroneously think is in error, or you could
    think something works when it doesn't.
    Obviously true. That just means that you have to do your best to
    design the tests well.
    After I finish railstutorial.org, I will start my first Ruby on Rails web
    site, which will profile mutual funds and ETFs. How important is it that I
    do the "bundle exec rspec spec" testing as thoroughly as the tutorial does?
    Vitally important. Apart from anything else it will allow you to
    sleep at night being reasonably confident that the change you made to
    the site today will not have messed up some other aspect of the site
    that you had not considered, so you will not wake up to an inbox full
    of messages from irate customers complaining.

    Colin
    RSpec tests are really quite necessary for a couple of reasons
    (there's a lot more, but these are crucial to me)

    1) They let you test the various units of your code independent of
    other elements, which makes verifying them a lot easier
    2) They give you a much better insight into your code when it is
    failing by providing a better means of seeing which parts actually
    fail.

    External tests, such as driven from a web driver, are equally essential:

    1) They ensure that the whole program is working together well
    (integration testing)
    2) They test your program from the point of view of the user

    Don't skip either, in any "real program" -- anything you plan on using
    beyond a learning exercise. Don't skip them on your learning exercises
    either, really, as it is a habit well engrained.

    There are several reasons for this, but to me it involves addressing 3
    questions:

    1) what do you want? (the spec)
    2) what will having that get you? (the problem this solves)
    3) how will you know when you have it? (the tests)

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedMar 16, '13 at 4:21a
activeMar 16, '13 at 7:58p
posts4
users4
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase