Ebook Studio

Ruby TDD Guide

Ruby TDD Guide

Ruby TDD Guide

I wrote this guide for Java developers using this repository as a course, not as a generic Ruby handout. At the same time, I do not want that title to scare anyone away. If you are coming from another language, you can still use this course well. I use Java as a comparison point because it helps me explain certain Ruby ideas clearly.

The repository now contains fifteen topics, two appendices, runnable topic tests, and answer files kept outside the normal exercise flow. That means I can teach Ruby here as a real learning path rather than as a short workshop.

Why I Wrote The Guide This Way

I am not trying only to teach Ruby syntax. I am trying to teach how Ruby code is shaped, how tests help shape it, and how your instincts may need to change as the problems become more idiomatic.

If you want the shortest orientation, start with README.md . If you want the course map, read course_overview.md . I wrote this guide to sit between those two. It explains how I expect you to move through the repository and what mindset shifts matter most along the way.

Who I Had In Mind

When I wrote this guide, I assumed:

It does not assume prior Ruby experience.

If you already know another dynamic language, some of the syntax will feel familiar. The design questions will still matter.

What This Repository Actually Contains

The English course lives under the en/ directory and is organized into fifteen topics:

There are also two appendices:

Each topic directory uses the same basic shape:

That consistency matters. I do not want you to spend energy rediscovering the structure in every topic. I want you to spend that energy on the code.

How To Run The Course

From the en/ directory, run the full course:

./ run_tests . sh ruby_tdd_guide_for_java_developers.md bash Run a single topic from the course root:

./ run_tests . sh topic_01_ruby_basics ruby_tdd_guide_for_java_developers.md bash Or run a topic with its own runner:

./ topic_01_ruby_basics / run_topic_tests . sh ruby_tdd_guide_for_java_developers.md bash The root runner checks for the gems the repository needs and installs them if they are missing. At the moment that includes erb , csv , sqlite3 , and rspec .

By the time you reach CSV and SQLite, you are no longer studying only language features. You are also working with the shape of a small Ruby project, and I want the tooling to stay easy enough that the design questions remain visible.

How I Recommend You Study One Topic