Mock#to_ary and Array#flatten problem

27 views
Skip to first unread message

Robert Pankowecki (rupert)

unread,
Oct 11, 2010, 8:23:59 AM10/11/10
to mocha-developer
ruby-1.9.2-head > m = ActiveSupport::TestCase.new('a').mock
#<Mock:0xae73b64>
ruby-1.9.2-head > [[m]].flatten
Mocha::ExpectationError: unexpected invocation: #<Mock:
0xae73b64>.to_ary()

from (irb):12:in `flatten'
from (irb):12
from /home/rupert/.rvm/gems/ruby-1.9.2-head/gems/railties-3.0.0/lib/
rails/commands/console.rb:44:in `start'
from /home/rupert/.rvm/gems/ruby-1.9.2-head/gems


Looking at
http://mail-index.netbsd.org/pkgsrc-changes/2010/08/03/msg044420.html
it seems related to patch #22630.

Can you reproduce it ?

Robert Pankowecki

Robert Pankowecki (rupert)

unread,
Oct 11, 2010, 8:23:59 AM10/11/10
to mocha-developer

James Mead

unread,
Oct 23, 2010, 9:22:53 AM10/23/10
to mocha-d...@googlegroups.com
Hi Robert,

I have just reproduced this. I've taken the liberty of creating a
Lighthouse ticket [1] on your behalf.

The problem is an interesting one and needs some more thought. But if
you or anyone else has any ideas, please comment on the ticket.

Thanks for taking the time to submit the bug report.

Cheers, James.

[1] http://floehopper.lighthouseapp.com/projects/22289-mocha/tickets/70


On 11 October 2010 13:23, Robert Pankowecki (rupert)

Reply all
Reply to author
Forward
0 new messages