Batteries Included
Crystal comes with a lot of tooling baked in to help you get started quickly on projects. Because the compiler is smart enough to catch many errors, Crystal has effectively already written many of the input tests you’d need to write when coding in dynamic languages. Nevertheless, the Crystal standard library contains a Spec module supporting unit testing and Behavior-Driven Development. It even has the look and feel of RSpec, the well-known BDD framework in Ruby.
Here’s an overview of what’s included:
-
Project creation tools with ready-made code templates and spec testing.
-
Dependency management, which offers easy automated inclusion of external packages (called shards: a pun on Crystal and shared library).
-
A code formatter ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access