Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 3cc47e3c3c
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 57 lines (41 sloc) 2.278 kb

Yellow Belt Ruby Katas

This is template for beginner level Ruby Katas done with tests in rspec-given. The katas are taken more or less from the Coding Kata site.

The idea for putting this out as git-hub project is that as a new Ruby learner, I wanted to explore using rspec-given with some small katas. I was also inspired by Jim Weirich's gilded rose kata. I really liked having the test template set up for me. I wanted to translate this to a set of smaller beginner katas.

Of course, being a beginner, I had some pain in getting everything in my project setup and working for the first couple katas, but after I got my feet wet everything became quite enjoyable and was a lot of fun. My hope is having the tests and a project all ready set up will take the initial pain out of it for people and leave all the fun.

Setup instructions

I am assuming that you have Ruby 1.9 setup on your system:

  • Run 'bundle install' in the project directory, to install all prerequisite gem files.
  • Run 'rake' in the project directory. You should see all the tests for the katas run as pending
  • Choose a kata. The shell source code with instructions is in the lib directory and the test is in the spec directory.
  • Delete the line that says before { pending }
  • Run rake again. You should have failing tests now
  • Fix the the code and run the tests!

If you have any problem setting up the project, please let me know.

Git Branches

I do have a solution branch with my solutions in them - branch named solutions. There are also quite a number of solutions on the Coding Kata site. I found it fun to browse them and see how other people solved them after I had finished mine.

Corrections

Being a beginner myself, there might be mistakes or something I missed. As always, feedback is welcome.

Thanks

Special thanks to Doug Alcorn, who helped me setup my project to run the rspec tests through emacs. If you are interested in emacs, I would recommend the rspec-mode. Doug also has a cool ruby-conf.el

Something went wrong with that request. Please try again.