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 =>
'w...@example.com',
        :password => 'who', :password_confirmation =>
'who' }.merge(options)
    end
end


Am I missing something here? Im running Rails 2.1.0 .

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to