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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090225/8e667eea/attachment.html>
On Wed, Feb 25, 2009 at 4:50 PM, Yi Wen <hayafirst at 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> ?? ? ? ?presenter.stub!(:account).and_return account > any idea? Thanks > Yi > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
On Wed, Feb 25, 2009 at 2:50 PM, Yi Wen <hayafirst at gmail.com> wrote:> 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 > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >Put parentheses around ''account''. ///ark
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 On Wed, Feb 25, 2009 at 5:04 PM, David Chelimsky <dchelimsky at gmail.com>wrote:> On Wed, Feb 25, 2009 at 4:50 PM, Yi Wen <hayafirst at 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 > > > presenter.stub!(:account).and_return account > > any idea? Thanks > > Yi > > > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090225/4485c267/attachment.html>
Unfortunately, it doesn''t solve the problem. Thanks anyway Yi On Wed, Feb 25, 2009 at 5:18 PM, Mark Wilden <mark at mwilden.com> wrote:> On Wed, Feb 25, 2009 at 2:50 PM, Yi Wen <hayafirst at gmail.com> wrote: > > 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 > > > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > Put parentheses around ''account''. > > ///ark > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090225/747ec971/attachment.html>