[rspec-devel] [ rspec-Feature Requests-7536 ] Mock expectations can be called more than once and ordered
noreply at rubyforge.org
noreply at rubyforge.org
Fri Jan 5 02:13:31 EST 2007
Feature Requests item #7536, was opened at 2007-01-02 15:26
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7536&group_id=797
Category: None
Group: None
Status: Open
Priority: 3
Submitted By: Brian Takita (btakita)
Assigned to: Nobody (None)
Summary: Mock expectations can be called more than once and ordered
Initial Comment:
the_mock = mock("the_mock")
the_mock.should_receive(:foo).ordered
the_mock.should_receive(:bar).ordered
the_mock.should_receive(:foo).ordered
the_mock.should_receive(:baz).ordered
----------------------------------------------------------------------
>Comment By: Brian Takita (btakita)
Date: 2007-01-04 23:13
Message:
require "rubygems"
require "spec"
context "An Ordered mock" do
specify "should allow a method to be ordered twice" do
the_mock = mock("the_mock")
the_mock.should_receive(:foo).ordered
the_mock.should_receive(:bar).ordered
the_mock.should_receive(:foo).ordered
the_mock.should_receive(:baz).ordered
the_mock.foo
the_mock.bar
the_mock.foo
the_mock.baz
end
end
----------------------------------------------------------------------
Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-01-02 16:17
Message:
Do you have a failing spec?
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7536&group_id=797
More information about the rspec-devel
mailing list