a very awesome tech blog

The official blog of super awesome full stack web developer

Little tip for writing functional tests in MiniTest with MonBan

21 Feb 2015

If you have an app using [MonBan](https://github.com/halogenandtoast/monban) you might be using helpers like `current_user` in view layer. How do you write functional test for it? I ran into this error when I tried. ```ruby ActionView::Template::Error: undefined method `user' for nil:NilClass ...

Minimum and maximum values in Ruby array

8 Feb 2015

Ruby provides convenient methods to find a minimum or a maximum value in an array. ```ruby numbers [23, 20, 35, 3, 8] > [23, 20, 35, 3, 8] numbers.min > 3 numbers.max > 35 numbers.minmax > [3, 35] ``` Good stuffs! ref: http://www.rubydoc.org/core2.2.0/Enumerable.html ...