    # File lib/action_controller/assertions/routing_assertions.rb, line 52
          def assert_generates(expected_path, options, defaults={}, extras = {}, message=nil)
            clean_backtrace do
              expected_path = "/#{expected_path}" unless expected_path[0] == ?/
              # Load routes.rb if it hasn't been loaded.
              ActionController::Routing::Routes.reload if ActionController::Routing::Routes.empty?

              generated_path, extra_keys = ActionController::Routing::Routes.generate_extras(options, defaults)
              found_extras = options.reject {|k, v| ! extra_keys.include? k}

              msg = build_message(message, "found extras <?>, not <?>", found_extras, extras)
              assert_block(msg) { found_extras == extras }

              msg = build_message(message, "The generated path <?> did not match <?>", generated_path,
                  expected_path)
              assert_block(msg) { expected_path == generated_path }
            end
          end