[rspec-devel] [ rspec-Bugs-4690 ] Ordering of mock calls doesn't work in block mode

noreply at rubyforge.org noreply at rubyforge.org
Sat Oct 14 09:19:19 EDT 2006


Bugs item #4690, was opened at 2006-06-06 19:31
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=4690&group_id=797

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Aslak Hellesoy (aslak_hellesoy)
Assigned to: Nobody (None)
Summary: Ordering of mock calls doesn't work in block mode

Initial Comment:
Two failing (and disabled) tests have been added to mock_ordering_test.rb to demonstrate this.

----------------------------------------------------------------------

>Comment By: Aslak Hellesoy (aslak_hellesoy)
Date: 2006-10-14 09:19

Message:
Moving the tests here:

      def FIXME_test_two_in_order_calls_with_block
        @mock.should_receive(:doit).ordered do |a, b|
          a.should_equal "a1"
          a.should_equal "b1"
        end
        @mock.should_receive(:doit).ordered do |a, b|
          a.should_equal "a2"
          a.should_equal "b2"
        end
        @mock.doit "a1", "b1"
        @mock.doit "b1", "b2"
        @mock.__verify
      end

      def FIXME_test_two_out_of_order_calls_with_block
        @mock.should_receive(:doit).ordered do |a, b|
          a.should_equal "a1"
          a.should_equal "b1"
        end
        @mock.should_receive(:doit).ordered do |a, b|
          a.should_equal "a2"
          a.should_equal "b2"
        end
        @mock.doit "b1", "b2"
        @mock.doit "a1", "b1"
        @mock.__verify
      end


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=4690&group_id=797


More information about the rspec-devel mailing list