small medium large xlarge

22 Jan 2012, 20:26
Joerg Leuschke (3 posts)

The console output of “rake test” shown in the book looks different from what I get when running the tests. In the book the output shows a line for each process test class and each executed test case. I only get a very brief output (one dot for each test)!?

Is there a way to enable the extended console output?


24 Jan 2012, 21:02
Joerg Leuschke (3 posts)

Just to provide a bit more background information to my question. When I run the test of one of the examples provided by the book, I get the following output:

Run options: 

# Running tests:


Finished tests in 0.111129s, 44.9928 tests/s, 206.9667 assertions/s.

5 tests, 23 assertions, 0 failures, 0 errors, 0 skips

Whereas the book shows the following output:

Loaded suite lib/rake/rake_test_loader

     PASS product attributes must not be empty (0.23s)

Finished in 0.231576 seconds.

1 tests, 5 assertions, 0 failures, 0 errors, 0 skips

Maybe the different output is caused by changes in rails or ruby itself or by some options. I am just starting out with ruby/rails and would really like to have a bit more details when running tests.

24 Jan 2012, 22:51
Sam Ruby (633 posts)

That function is provided by a gem named turn. Turn itself has been undergoing rapid evolution, so its results may change.

To enable turn, add the following to your Gemfile:

gem 'turn'

Current version of turn is 0.8.3.

Once that is done, execute bundle install, and then rerun rake test

You must be logged in to comment