Skip to content
Browse files

better expectation messages

  • Loading branch information...
1 parent 6382119 commit 425aa6c4bcd217c1c734989e63e9b992cb55441c @michihuber committed
Showing with 7 additions and 6 deletions.
  1. +7 −6 spec/rspec/mocks/at_least_spec.rb
View
13 spec/rspec/mocks/at_least_spec.rb
@@ -99,35 +99,36 @@ module Mocks
context "when sent with 0" do
before { RSpec::Mocks.stub(:warn_deprecation) }
+
it "outputs a deprecation warning" do
RSpec::Mocks.should_receive(:warn_deprecation)
@double.should_receive(:do_something).at_least(0).times
end
- it "passes with at_least(0) with no return if called once" do
+ it "passes with no return if called once" do
@double.should_receive(:do_something).at_least(0).times
@double.do_something
end
- it "passes with at_least(0) with return block if called once" do
+ it "passes with return block if called once" do
@double.should_receive(:do_something).at_least(0).times { true }
@double.do_something
end
- it "passes with at_least(0) with and_return if called once" do
+ it "passes with and_return if called once" do
@double.should_receive(:do_something).at_least(0).times.and_return true
@double.do_something
end
- it "passes with at_least(0) with no return if never called" do
+ it "passes with no return if never called" do
@double.should_receive(:do_something).at_least(0).times
end
- it "passes with at_least(0) with return block if never called" do
+ it "passes with return block if never called" do
@double.should_receive(:do_something).at_least(0).times { true }
end
- it "passes with at_least(0) with and_return if never called" do
+ it "passes with and_return if never called" do
@double.should_receive(:do_something).at_least(0).times.and_return true
end
end

0 comments on commit 425aa6c

Please sign in to comment.
Something went wrong with that request. Please try again.