I am working through the Everyday Scripting With Ruby book and am trying
to run assertion tests in irb.
If I type in:
irb(main):005:0> require ‘test/unit’
As you can see above it returns true. I am assuming that this will load
the unit test methods in irb. However, if I type in an assertion test
NoMethodError: undefined method `assert_equal’ for main:Object
It fails as above.
I have also tried to use the load command as:
load “Test::Unit” but that does not seem to work either. See below:
irb(main):008:0> load “Test::Unit”
LoadError: no such file to load – Test::Unit
from (irb):8:in `load’
What do I need to do to get the assertion methods working in irb?