Topic: Functional Test failing

I have this functional test, which fails with this message, can anyone help me out why is it throwing this error

test/functional/admin/user_controller_test.rb:45: syntax error

Here the the user_controller_test.rb file, thats causing the error

# Functional Test file for user_controller
require File.dirname(__FILE__) + '/../../test_helper'
require 'admin/user_controller'

# Re-raise errors caught by the controller.
class Admin::UserController; def rescue_action(e) raise e end; end

class Admin::UserControllerTest < Test::Unit::TestCase
  def setup
    @controller = Admin::UserController.new
    @request    = ActionController::TestRequest.new
    @response   = ActionController::TestResponse.new
  end

  # Test case for new method
  def test_new
    get :new  # Get test helper method to call the new action
    assert_template 'admin/user/new'  # Test whether the correct view is rendered
    assert_tag 'h1', :content => 'Create new user'  # Test the content via the h1
    # Testing whether a form element points to /admin/user/create
    assert_tag 'form', :attributes => {:action => '/admin/user/create'}
  end
 
  # Test case for create method
  #def test_create
  #  assert_equal 0 , User.find(:all).size # Ensures that there are no users in the test database
  #  post :create, :user => {:first_name => 'James', # Create a new User by simulating the HTTP POST method
                         #   :last_name => 'Apps'} # sending a form to create action
  #  assert_response :redirect # Ensures a redirect
  #  assert_redirected_to :action => 'index' # Ensures that the redirect is to the index page
  #  assert_equal 1, User.find(:all).size  # Ensures that a new User object
  #  assert_equal 'User James Apps was successfully created.', flash[:notice]  # Has Rails set the flash variable correctly
  #end
 
  def test_create
    get :new
    assert_template 'admin/user/new'
    assert_difference(User, :count) do
      post :create, :user => {:first_name => 'James',
                                :last_name => 'Apps' }
      assert_response :redirect
      assert_redirected_to :action => 'index'
  end
  assert_equal 'User James Apps was successfully created.', flash[:notice]
(Line 45) end


Thank you

Re: Functional Test failing

Don't worry I fixed it, I needed to add in a extra 'end'.

Thank you for looking though