Topic: assert_generates & assert_recognizes not found in routing unit test

1) Error:
test_generates(RoutingTest):
NoMethodError: undefined method `assert_generates' for #<RoutingTest:0x53b10>
    test/unit/routing_test.rb:17:in `test_generates'

  2) Error:
test_recognizes(RoutingTest):
NoMethodError: undefined method `assert_recognizes' for #<RoutingTest:0x53a34>
    test/unit/routing_test.rb:26:in `test_recognizes'$:.unshift File.join(File.dirname(__FILE__),'..','lib')

----------file----------

require 'test/unit'

class RoutingTest < Test::Unit::TestCase

  def test_generates
    # map.connect ':zone/:content_type_name/:id',
    # :controller => 'Content', :action => 'zoneshow'
    assert_generates("government/news",:zone => "government", :content_type_name => "news",:controller => "Content", :action=>"zoneshow")
  end
 
  def test_recognizes()
    # map.connect ':zone/:content_type_name/:id',
    # :controller => 'Content', :action => 'zoneshow'
    assert_recognizes({:zone=>"government", :content_type_name=>"news", :id=>"1",:controller=>"Content", :action=>"zoneshow"},"/government/news/1")
  end
end

------environment----------

Rails 1.2.3
Ruby 1.8.6

Last edited by RichOnRails (2007-11-20 14:25:59)