[rspec-users] update_attributes fails in rake spec but not in script/spec???

Patrick J. Collins patrick at collinatorstudios.com
Fri Apr 30 14:14:02 EDT 2010


So I just wrote a spec, and tested it by running script/spec

I get:

Finished in 28.558841 seconds

5 examples, 0 failures

So then I did:  rake spec

and I get a bunch of errors on that same file "wrong number of arguments (0 for 3)"

I then threw a debugger into the code to try to see where it was failing, and
it was failing when I was doing self.update_attributes in the model...

I tried assigning this myself in the debugger console:

(rdb:1) self.update_attribute(:job_item_count, 4)
ArgumentError Exception: wrong number of arguments (0 for 3)

(rdb:1) self
#<ResultList id: 1, table_id: nil, newsletter_id: 3, type: nil, job_start:
"2010-04-30 10:25:17", job_finish: "2010-04-30 10:25:17", job_item_count: 0,
job_action_count: -5, job_error: nil, attachment_file_name: nil,
attachment_content_type: nil, attachment_file_size: nil, attachment_updated_at:
nil, created_at: "2010-04-30 18:01:41", updated_at: "2010-04-30 18:01:41">

... ????????????

Can anyone please explain to me why this is behaving this way?

Patrick J. Collins

More information about the rspec-users mailing list