Created
December 12, 2017 18:28
-
-
Save danielwestendorf/84058a8b458a4f3cfe87e13bd8b9ca9c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/support/have_size.rb | |
require "rspec/expectations" | |
RSpec::Matchers.define :have_size do |expected| | |
match do |actual| | |
actual.size == expected | |
end | |
failure_message do |actual| | |
"expected #{actual.inspect} to have size of #{expected}, but was #{actual.size}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment