Guest User

Untitled

a guest
Dec 15th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. # spec/support/have_size.rb
  2.  
  3. require "rspec/expectations"
  4.  
  5. RSpec::Matchers.define :have_size do |expected|
  6. match do |actual|
  7. actual.size == expected
  8. end
  9.  
  10. failure_message do |actual|
  11. "expected #{actual.inspect} to have size of #{expected}, but was #{actual.size}"
  12. end
  13. end
Add Comment
Please, Sign In to add comment