Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change assert_block to assert

  • Loading branch information...
commit 3c2ae481b2c731530420f6479d5af161d9c726fe 1 parent 1d9d7f4
@melindaweathers authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/shoulda/context/assertions.rb
View
8 lib/shoulda/context/assertions.rb
@@ -52,14 +52,14 @@ def assert_accepts(matcher, target, options = {})
end
if matcher.matches?(target)
- assert_block { true }
+ assert { true }
if options[:message]
message = matcher.respond_to?(:failure_message_for_should_not) ? matcher.failure_message_for_should_not : matcher.negative_failure_message
assert_match options[:message], message
end
else
message = matcher.respond_to?(:failure_message_for_should) ? matcher.failure_message_for_should : matcher.failure_message
- assert_block(message) { false }
+ assert(message) { false }
end
end
@@ -73,14 +73,14 @@ def assert_rejects(matcher, target, options = {})
not_match = matcher.respond_to?(:does_not_match?) ? matcher.does_not_match?(target) : !matcher.matches?(target)
if not_match
- assert_block { true }
+ assert { true }
if options[:message]
message = matcher.respond_to?(:failure_message_for_should) ? matcher.failure_message_for_should : matcher.failure_message
assert_match options[:message], message
end
else
message = matcher.respond_to?(:failure_message_for_should_not) ? matcher.failure_message_for_should_not : matcher.negative_failure_message
- assert_block(message) { false }
+ assert(message) { false }
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.