Learn to build a rate limiter in Elixir using ExRated, ExUnit, and doctests in a step-by-step guide. The tutorial covers the setup of ExRated for bucket-based rate limiting, using TDD for development, and implementing unit tests along with logging. Highlights include the use of `@doc` blocks for documentation-driven tests and exploring the limitations of doctests. It emphasizes the importance of real unit tests for comprehensive testing, and covers additional enhancements like function typespecs and input guards.
Table of contents
Project SetupUnit Testing SetupRate Limiter Setup and the @doc BlockImplementing ExRatedImplementing Unit Tests and LoggingBonus: Function TypespecsBonus: Run-time Function Input GuardsThanks for reading!Sort: