[rspec-users] exactly(N).times incorrectly passing for N < actual

David Chelimsky dchelimsky at gmail.com
Thu Nov 27 06:40:43 EST 2008


On Thu, Nov 27, 2008 at 4:45 AM, Ashley Moran
<ashley.moran at patchspace.co.uk> wrote:
> 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].

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

Thanks,
David

>
> Thanks
> Ashley
>
> [1]
> http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/618-exactlyntimes-incorrectly-failing-for-n-actual
>
> --
> http://www.patchspace.co.uk/
> http://aviewfromafar.net/
>
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list