curriculum for rspec/testing?

14 views
Skip to first unread message

Heather Moore-Farley

unread,
May 23, 2016, 8:59:28 PM5/23/16
to RailsBridge Workshops
Hey- first time to post here.

I recently taught at the East Bay Railsbridge event and offhandedly mentioned TDD. A couple of the students brought it up with me later and sounded interested in a Railsbridge curriculum that goes over testing: structure of tests, how they connect with the code, how to 'TDD', etc. Is that something that other people think is a good idea? Rspec is pretty easy to set up. I imagine this could be a topic that the more advanced students would like to tackle. I could come up with an outline and do a pull request.

Heather

Zee

unread,
May 23, 2016, 9:16:43 PM5/23/16
to railsbridg...@googlegroups.com
That sounds awesome! In the purple class last weekend in SF we spent about 2 hours going through how to write and run a test in rspec, followed by how to write a feature test w/capybara. Would have been great to have a RB document to point them at for further study.
--
You received this message because you are subscribed to the Google Groups "RailsBridge Workshops" group.
To unsubscribe from this group and stop receiving emails from it, send an email to railsbridge-work...@googlegroups.com.
To post to this group, send email to railsbridg...@googlegroups.com.
Visit this group at https://groups.google.com/group/railsbridge-workshops.
For more options, visit https://groups.google.com/d/optout.


--
Typed with thubdgjs

Lillie Chilen

unread,
May 23, 2016, 9:36:55 PM5/23/16
to railsbridg...@googlegroups.com
YES PLZ
Lillie Chilen
@lilliealbert
('li-lee shuh-'leen)

Sameer Siruguri

unread,
May 24, 2016, 6:24:10 AM5/24/16
to RailsBridge Workshops
I wd love to help out!

Sarah Allen

unread,
May 24, 2016, 8:30:47 AM5/24/16
to railsbridg...@googlegroups.com
I would be so excited about this.  Most folks probably don't remember that it was actually quite controversial for the first workshop -- half of us felt we should teach TDD and half felt testing was an advanced topic.  For the first workshops, each teacher taught from a basic outline and did whatever they felt was right.  

When I flew out to Boston for the workshop at Harvard in the fall, where there would be 50 students per teacher, I wrote up all of the detailed steps of the app which became the basis of the first curriculum.  About a year later Yehuda Katz advocated for TDD once again, and helped create a cucumber-based curriculum.  A couple of years later, I think it was Seattle moved away from TDD, but I'm not sure whether it was really anti-TDD and more that it presented the concepts separately from the step-by-step, which everyone really liked.

There's been a lot of discussion in the Ruby community about whether testing should be taught in intro classes, or whether it is an advanced topic.  I feel like it is helpful for complete beginners to do stuff interactively at first, but if you don't teach them testing pretty early on, you are doing them a disservice.  When I taught professionally, I developed a pattern of:  
1) introduce concepts (basic syntax, patterns and why they are learning this)
2)  interactive programming to give them a feel for it (usually with irb)
3) Test first teaching (give them a failing test, they write the code to make it pass)

My test first teaching was inspired by Alex Chafee who had used this technique to teach Java.  I made the Ruby lessons, and later I contributed the JavaScript lessons (if I recall correctly, based on those that were taught at Blazing Cloud).

Ruby and JavaScript are published here:  http://testfirst.org/

It's officially a project of Bridge Foundry.  I also have Rails lessons that I never added and would be happy to share.  Also, there's  2010 GoGaRuCo talk, if you are interested in the TFT pedagogy.

I'd be very excited to see a Bridge curriculum that emphasized testing!  

Sarah




On Tue, May 24, 2016 at 3:24 AM, Sameer Siruguri <siru...@gmail.com> wrote:
I wd love to help out!

Heather Moore-Farley

unread,
May 24, 2016, 7:52:39 PM5/24/16
to RailsBridge Workshops
I'm glad there is interest!

I've been thinking of what kind of "project" would be a good one to do for testing. Part of me is thinking doing a "Pig Latin" project would be interesting- you can basically keep adding tests until it works:
  1. test that it turns "cat" into "atcay"
  2. test that it handles words with multiple consonants ("planet" to "anetplay")
  3. test that it handles words that start with vowels ("apple" to "appleay/appleway")
  4. test that it handles "qu" ("quick" to "ickquay")
  5. test that it handles strings with multiple words
  6. test that it handles sentences and preserves punctuation 
  7. etc?
The biggest problem with this is that Pig Latin is very English-centric and I don't know if that will put off some students.

Other (simpler) idea included Rock/Paper/Scissors/Lizard/Spock.

Also, I was mostly imaging this as just an intro to testing and hadn't really thought about the Capybara side of things, though that's important, too. Maybe RPSLS will make a good visual option for capybara testing.

Heather

Alex Chaffee

unread,
May 27, 2016, 12:33:02 PM5/27/16
to railsbridg...@googlegroups.com, hrfa...@gmail.com

On Tue, May 24, 2016 at 6:30 PM, Heather Moore-Farley <hrfa...@gmail.com> wrote:
Part of me is thinking doing a "Pig Latin" project would be interesting

That's what we thought too! :-)


(the "live" testing app kinda works, but if not, it's the same test files that are in the repo)

 - A

--
Reply all
Reply to author
Forward
0 new messages