Forum: RSpec wrong number of arguments (2 for 1)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
874be46e8593deadb2cec84b70b26725?d=identicon&s=25 Yi Wen (hayafirst)
on 2009-02-26 00:01
(Received via mailing list)
The following statement gave me "wrong number of arguments (2 for 1)"
and it
is the only error. no stack trace.
        presenter.stub!(:account).and_return account

any idea? Thanks

Yi
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2009-02-26 00:18
(Received via mailing list)
On Wed, Feb 25, 2009 at 4:50 PM, Yi Wen <hayafirst@gmail.com> wrote:
> The following statement gave me "wrong number of arguments (2 for 1)" and it
> is the only error. no stack trace.

try running with --backtrace
48641c4be1fbe167929fb16c9fd94990?d=identicon&s=25 Mark Wilden (Guest)
on 2009-02-26 00:48
(Received via mailing list)
On Wed, Feb 25, 2009 at 2:50 PM, Yi Wen <hayafirst@gmail.com> wrote:
>
Put parentheses around 'account'.

///ark
874be46e8593deadb2cec84b70b26725?d=identicon&s=25 Yi Wen (hayafirst)
on 2009-02-26 01:18
(Received via mailing list)
I haven't looked into it too much. But I believe it is because I
implemented
method_missing and respond_to?, which probably conflicts with RSpec's
imlementations. I have been wanting to re-implement my functionality in
another way other than method_missing for a long time. It seems now is
the
perfect time to do so. Thanks!

Yi
874be46e8593deadb2cec84b70b26725?d=identicon&s=25 Yi Wen (hayafirst)
on 2009-02-26 01:19
(Received via mailing list)
Unfortunately, it doesn't solve the problem. Thanks anyway

Yi
This topic is locked and can not be replied to.