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

Ashley Moran ashley.moran at patchspace.co.uk
Thu Nov 27 05:45:19 EST 2008


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/tickets/618-exactlyntimes-incorrectly-failing-for-n-actual

-- 
http://www.patchspace.co.uk/
http://aviewfromafar.net/





More information about the rspec-users mailing list