examples to go with introductory Ruby class
Ruby
Permalink
Failed to load latest commit information.
01_class added example of superclass Mar 15, 2010
02_test_first move test_first exercise right after introducing classes Apr 12, 2010
03_calculator Update 03_calculator/calculator_spec.rb Nov 14, 2011
04_temperature move first two testfirst exercises before modules and scope Apr 12, 2010
05_scope move first two testfirst exercises before modules and scope Apr 12, 2010
06_modules move first two testfirst exercises before modules and scope Apr 12, 2010
07_simon_says Update 07_simon_says/simon_spec.rb Nov 14, 2011
07a_convert_markdown change order Oct 10, 2010
08_pig_latin added edge case Apr 16, 2012
09_timer updated lessons for two-day ruby Mar 15, 2010
10_enumerables fix the format of the exercise Sep 30, 2012
10a_book_titles change order Oct 10, 2010
11_array changed to == to resolve warning about parens Aug 4, 2010
12_blocks ruby 1.9.2 support May 16, 2011
13_builder Fix test message typo Dec 6, 2011
14_web nokogiri Nov 15, 2011
15_dictionary better spec to test for more cases Oct 17, 2010
16_testdata test data spec Aug 4, 2010
17_rake Example showing basic rake task and how to test by putting logic in a… Mar 16, 2011
exceptions implicit Apr 19, 2012
notes Ruby notes Nov 14, 2011
performance_monitor added performance monitor Mar 7, 2011
.gitignore Example showing basic rake task and how to test by putting logic in a… Mar 16, 2011
.rvmrc added rvmrc to easily manage environment setup for lessons Sep 10, 2012
README.md fix the spacing on the fakeweb install instructions in the Readme Sep 10, 2012

README.md

Welcome to Ruby!

Setup

  • Check out the git repository

    git clone git://github.com/blazingcloud/ruby_lessons.git
    
  • Install RSpec

    gem install rspec
    
  • Configure RSpec (optional). If you're running a bash shell, you can put the following in your .bash_profile to make the output a bit nicer.

    alias rspec="rspec --color --format nested"
    
  • For lesson 14

    gem install fakeweb
    

Resources

Ruby Language

Good online references for Ruby & Rails

When you have a question...

First, search for the answer (keywords, exact error string)

If you didn’t find the answer and you need to ask your question:

  1. Include version numbers: $ ruby -v ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
  2. Note where you have already looked for an answer
  3. If you can, include code snippets that reproduce the problem in isolation

Other good resources

Related Projects

As a last resort

Credits

  • Test-First Teaching Concept by Alex Chaffee
  • All exercises cross-published at TestFirst.org where some were created in collaboration with Liah Hansen
  • Most examples and class by Sarah Allen