Ruby Foundations: More Topics

Summary

This course will cover some language specific aspects of the Ruby programming language. We'll specifically look at blocks and the Minitest testing library. This course will include assignments that will build upon knowledge gained from previous courses. After this course, you should have a deeper understanding of blocks and how to use Minitest.

Phase

Programming and Back-end Development

Prerequisites

Detailed Syllabus

Blocks

  • Closures in Ruby
  • Calling methods with blocks
  • Writing methods that take blocks
  • Build a "times" method from scratch
  • Build an "each" method from scratch
  • Build an "select" method from scratch
  • Build an "reduce" method from scratch
  • Build a todo list
  • Blocks and variable scope
  • symbol to proc

Introduction to Testing

  • Setting up Minitest
  • Introduction to Minitest
  • Assertions and refutations
  • The general approach for testing
  • Testing equality
  • Write your first test suite
  • Code and test coverage