How To Test Ruby CLI: Console

One of the most interesting challenges I met during Hanami development is to write isolated integration tests. The framework ships with an extensive Command Line Interface (CLI) to generate (or destroy) code, start the server, open a Ruby (or a database) console, create/drop the database, run the migrations, precompile assets, and print informations. Console Hanami console is an interactive REPL based on IRB, which is useful to interact with the objects defined in a project. »

How To Test Ruby CLI: Code Generators

One of the most interesting challenges I met during Hanami development is to write isolated integration tests. The framework ships with an extensive Command Line Interface (CLI) to generate (or destroy) code, start the server, open a Ruby (or a database) console, create/drop the database, run the migrations, precompile assets, and print informations. Code Generators Code generators is a helpful feature that allows to generate code files. The main purpose is to speedup the development process. »

How To Test Ruby CLI: The Setup

One of the most interesting challenges I met during Hanami development is to write isolated integration tests. The framework ships with an extensive Command Line Interface (CLI) to generate (or destroy) code, start the server, open a Ruby (or a database) console, create/drop the database, run the migrations, precompile assets, and print informations. Full Isolation As I want to have integration tests to use CLI commands for real, the test suite is free of mocks/stubs. »

Lessons Learned In Open Source: The Motivations

It was a rainy Wednesday. That 5th of Oct 2011, I was driving to work, stuck in the traffic, while the radio announced it: Steve Jobs was died. I was shocked. For me and more than one generation, he was the iconic leader, whom fame and success went beyond his tech career. “Can I achieve the same?” I thought. Since that day, we self-proclaimed visionaries, we tried to emulate his attitude. »

Isolate Global State

Using global state in software programs, is handy for development, but evil to maintain. It can easily become source of bugs that are triggered by edge cases which are hard to track down. Let’s see why, and how we can mitigate the problem. An Example Of The Problem For instance, in Hanami code base we need to test how the framework configures itself according to certain env variables. We used to test like this: »