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 => ''who-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org'', :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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2010-Apr-05 12:13 UTC
Re: `test'': wrong number of arguments (1 for 2) (ArgumentError)
On Apr 5, 12:40 pm, Ram <yourstruly.vi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > Im trying to change the syntax of my tests to the > > test "some method" do > ... > end >[snip]> > Am I missing something here? Im running Rails 2.1.0 .That feature was only added after rails 2.1 if my memory is correct. Fred -- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.