Forum: RSpec exactly(N).times incorrectly passing for N < actual

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.
Ashley M. (Guest)
on 2008-11-27 12:48
(Received via mailing list)
Hi

This spec:

         it "should cache the HTML" do
           @uri.should_receive(:read).exactly(N).times
           5.times { @low_graphics_page.story_body }
         end

passes incorrectly for all N <= 4, and only fails for N > 6.

"once" and "twice" are similarly broken.

Is this a known issue?  If not, I filed a ticket[1].

Thanks
Ashley

[1]
http://rspec.lighthouseapp.com/projects/5645-rspec...

--
http://www.patchspace.co.uk/
http://aviewfromafar.net/
David C. (Guest)
on 2008-11-27 13:42
(Received via mailing list)
On Thu, Nov 27, 2008 at 4:45 AM, Ashley M.
<removed_email_address@domain.invalid> wrote:
>
> "once" and "twice" are similarly broken.
>
> Is this a known issue?  If not, I filed a ticket[1].

I commented in the ticket and ask that any subsequent conversation
take place there.

Thanks,
David
This topic is locked and can not be replied to.