recent TFT changes

6 views
Skip to first unread message

Alex Chaffee

unread,
Sep 23, 2010, 12:26:34 PM9/23/10
to test-first-teaching, Bradford Cottel
Here's a conversation that started on the mailing list for one of Blazing Cloud's classes. I thought I would move it to the TFT list.

Forwarded conversation
----------
From: Alex Chaffee <al...@stinky.com>
Date: Tue, Sep 21, 2010 at 9:43 AM
To: rails-tdd-v...@googlegroups.com


If anyone has any suggestions for improving the testfirst.org web site
or materials, please let me know. I made some changes to the content
and procedures so it would be good if the TAs and teacher played
around with it before the class, to help students with questions about
the homework. In fact, I'd love to know of any specific problems
students have with the exercises, treating them as bug reports.

In particular, Liah has asked if we could ditch the ZIP file, and make
two github repos, one for teachers, and one autogenerated (and
autopushed) for students with no solutions and containing only Ruby. I
think this is a great idea and I hope to get around to it this week.
(But of course, if I do, it would change the procedures yet again; see
previous paragraph.)

Also, I've patched rspec to quit after the first failure;
unfortunately this will require a Rakefile (again, autogenerated) in
each exercise subdirectory.

Yours -

 - Alex
--
Alex Chaffee - al...@stinky.com - http://alexch.github.com
Stalk me: http://friendfeed.com/alexch | http://twitter.com/alexch |
http://alexch.tumblr.com

----------
From: Bradford Cottel <br...@likethesky.com>
Date: Tue, Sep 21, 2010 at 11:10 AM
To: rails-tdd-v...@googlegroups.com


Alex, I'm a bit uneasy about students using a non-standard 'spec', if
that's what you mean (i.e., not submitting a patch for a new command
line option to the rspec team and having students use that)...

Looking at the two options I pasted in below--that are currently
available in spec--couldn't the same objective be achieved with a
spec.opts file that possibly uses a custom formatter?  Much better
option than a separate rakefile if it's possible...  and most all have a
spec.opts file for color, etc. already.

Anyway, just feeling funny about students learning on a non-standard
tool, then 'graduating' to a different one.

Btw--Sarah, et al.--(I know Alex is too modest to say this), but I think
we should have everyone start using 'Wrong' with rspec.  Understanding
error messages is at least half the battle!

~ Brad

----------
From: Alex Chaffee <al...@stinky.com>
Date: Tue, Sep 21, 2010 at 11:42 AM
To: rails-tdd-v...@googlegroups.com


I share your uneasiness. I spent many hours wracking my brain (and
those of others at GoGaRuCo) to think of a clean solution. The problem
is, you can tell RSpec to use a formatter, but unless it's in RSpec
core, you need to do some custom configuration to locate it. This is
compounded by the fact that each exercise is in a subdirectory. Rake
*should* be able to handle this, but it throws away the current
directory as soon as it locates the common Rakefile upstairs.

I can submit a patch to either RSpec or Rake but there's no guarantee
of success or speediness.

My proposed solution is to not use spec at all, but to use rake. This
is a standard command, and is one of the main ways people run tests in
real-world projects, so we're not teaching them bad habits. If each
subdirectory has its own set of files and tests, it may as well have
its own Rakefile, so (again) this is a good convention for them to
learn, not a bad one.

The "sspec" custom runner I wrote is a hack and was meant for
teachers, not students, to run. Hopefully the rakefile solution can
work for teachers too and we can dispense with sspec altogether.

Again, these are my suggestions and I welcome the discussion.

 - A

P.S. http://wiki.github.com/dchelimsky/rspec/custom-formatters shows
how to write the custom formatter and rake task -- pretty normal Ruby

--
Alex Chaffee - al...@stinky.com - http://alexch.github.com
Stalk me: http://friendfeed.com/alexch | http://twitter.com/alexch | http://alexch.tumblr.com
Reply all
Reply to author
Forward
0 new messages