Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Manually merge #21, non-block arguments fix.

Conflicts:
	lib/rspec-spies.rb
	spec/rspec-spies_spec.rb
  • Loading branch information...
commit e121da5528ca6755b2903bd4459e1271e4121837 2 parents af32100 + 6484d16
@MDaubs MDaubs authored
Showing with 8 additions and 1 deletion.
  1. +0 −1  lib/rspec-spies.rb
  2. +8 −0 spec/rspec-spies_spec.rb
View
1  lib/rspec-spies.rb
@@ -33,7 +33,6 @@ def reset
received_method_name, received_args, received_block = *message
result = (received_method_name == method_name)
result &&= argument_expectation_class.new(*@args || any_args).args_match?(*received_args)
- result &&= (received_block == block)
end
if @times
View
8 spec/rspec-spies_spec.rb
@@ -65,6 +65,14 @@ module Matchers
have_received(:slice).with(/foox/).matches?(@object).should be_false
end
+ it "matches if third argument is a block" do
+ @object.stub!(:slice)
+ @object.slice(5) do; end
+
+ have_received(:slice).with(5).matches?(@object).should be_true
+ have_received(:slice).with(5,anything).matches?(@object).should be_false
+ end
+
it "does not match if method is called with incorrect args" do
@object.stub!(:slice)
@object.slice(3)
Please sign in to comment.
Something went wrong with that request. Please try again.