Hi,
Im trying to change the syntax of my tests to the
test “some method” do
…
end
syntax from the existing
def test_some_method
…
end
syntax. Im pasting my test code below. Im getting the error in the
subject line if I try to run the test as a ruby script from the
console.
require File.dirname(FILE) + ‘/…/test_helper’
require ‘accounts_controller’
class AccountsController; def rescue_action(e) raise e end; end
class AccountsControllerTest < ActionController::TestCase
fixtures :accounts
def setup
@controller = AccountsController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
end
test “should allow signup” do
assert_difference ‘Account.count’ do
create_account
assert_response :redirect
end
end
protected
def create_account(options = {})
post :create, :account => { :name => ‘who’, :email =>
‘[email protected]’,
:password => ‘who’, :password_confirmation =>
‘who’ }.merge(options)
end
end
Am I missing something here? Im running Rails 2.1.0 .