RoR: Wrong Number of Arguments

By : skaz

I am trying to call a method in my Rails 3 code but am getting:

Failure/Error: integration_sign_in wrong_user ArgumentError: wrong number of arguments (0 for 1)

Here is the calling code (in an RSpec helper):

before(:each) do
    wrong_user = Factory(:user, :email => "[email protected]", :password=>"hellohello", :password_confirmation => "hellohello")
    integration_sign_in wrong_user

So it is clearly passing one argument. If the argument is null for some reason, would that make it consider it not a parameter?

RELEVANT BACKSTORY: For testing, I just switched from webrat to capybara. As suggested in Railscast 257, I also installed the launchy and database_cleaner gems. When I was using webrat, the code above worked as expected, but now (I believe related to database_cleaner) something is going wrong.

Possibly relevant: In my spec_helper.rb I changed to: config.use_transactional_fixtures = false (even though 'true' has the same problem)

Any ideas? Thanks.

By : skaz


This video can help you solving your question :)
By: admin