Method: Shoulda::Assertions#assert_accepts
- Defined in:
- lib/shoulda/assertions.rb
#assert_accepts(matcher, target) ⇒ Object
Asserts that the given matcher returns true when target
is passed to #matches?
48 49 50 51 |
# File 'lib/shoulda/assertions.rb', line 48 def assert_accepts(matcher, target) success = matcher.matches?(target) assert_block(matcher.) { success } end |