[ next ] [ prev ] [ contents ] [ up to A Real Test ] XP-Cinti TDD Workshop

Creating the untied? Method

Its simple enough to to add a method to the Net object.

# file: net.rb
class Net
  def untied?(x,y)
  end
end

And again we run our tests ...

  
$ ruby testnet.rb
Loaded suite testnet
Started...
..
Failure occurred in test_untied(TestNet) [testnet.rb:7]: Expected <true> but was <nil>

Finished in 0.040234 seconds.
1 runs, 1 assertions, 1 failures, 0 errors

Still no good, but we are making progress. The untied? method is being invoked, but it is returning nil when we expect it to return true.


[ next ] [ prev ] [ contents ] [ up to A Real Test ] Copyright 2003 by Jim Weirich.
Some Rights Reserved