Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add description to satisfy matcher.

- Closes #20.
  • Loading branch information...
commit 878d865edcfd04347b3710dc5ac74a9237edaa4b 1 parent d1653d7
@dchelimsky dchelimsky authored
View
4 lib/rspec/matchers/satisfy.rb
@@ -19,6 +19,10 @@ def failure_message_for_should
def failure_message_for_should_not
"expected #{@actual} not to satisfy block"
end
+
+ def description
+ "satisfy block"
+ end
end
# :call-seq:
View
4 spec/rspec/matchers/satisfy_spec.rb
@@ -1,6 +1,10 @@
require 'spec_helper'
describe "should satisfy { block }" do
+ it "describes itself" do
+ satisfy.description.should eq("satisfy block")
+ end
+
it "passes if block returns true" do
true.should satisfy { |val| val }
true.should satisfy do |val|
Please sign in to comment.
Something went wrong with that request. Please try again.