Hrvoje Šimić

Uninitialized class variable @@current_spec in Minitest

30 Apr, 2012 · 67 words · 1 min read
ruby

When using this awesome testing framework, this error was happening to me. Google didn’t help and it was happening because of my stupidity, but I thought I should share a solution and save you a few minutes.

It was happening because I used to run the tests with

$ rspec spec

The case is - you don’t need rspec to run minitests. Just run it like this

$ ruby spec/path/to/your/spec.rb