Created
August 24, 2015 23:07
-
-
Save brianjlandau/7e9b98d0fe0b6813adb4 to your computer and use it in GitHub Desktop.
This file contains 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
RSpec::Matchers.define :be_an_array_of do |expected| | |
match do |actual| | |
actual.is_a?(Array) && actual.all?{|item| item.is_a?(expected) } | |
end | |
failure_message do |actual| | |
"expected that #{actual} would be an array #{expected}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment